Old English liccian "to pass the tongue over the surface, lap, lick up," from Proto-Germanic *likkon (cf. Old Saxon likkon, Dutch likken, Old High German lecchon, German lecken, Gothic bi-laigon), from PIE imitative base *leigh- (cf. Sanskrit ledhi "he licks," Armenian lizum "I lick," Greek leikhein "to lick," Latin lingere "to lick," Old Irish ligim "I lick," Welsh llwy "spoon"). French lécher is a Germanic loan word.
To lick (someone or something) into shape (1610s) is in reference to the supposed ways of bears:
Beres ben brought forthe al fowle and transformyd and after that by lyckyng of the fader and the moder they ben brought in to theyr kyndely shap. ["The Pylgremage of the Sowle," 1413]
"to beat," 1535, perhaps from figurative use of lick (v.1) in the Coverdale bible that year in sense of "defeat, annihilate" (an enemy's forces) in Num. xxii:4:
Now shal this heape licke up all that is about vs, euen as an oxe licketh vp the grasse in the field.But to lick (of) the whip "taste punishment" is attested from mid-15c.
"an act of licking," c.1600, from lick (v.1). Meaning "small portion" is 1814, originally Scottish; hence U.S. colloquial sense. Sense of "place where an animal goes to lick salt" is from 1747. The jazz music sense of "short figure or solo" is by 1922.
whip into shape