goat

any of numerous agile, hollow-horned ruminants of the genus Capra, of the family Bovidae, closely related to the sheep, found native in rocky and mountainous regions of the Old World, and widely distributed in domesticated varieties.

The word for "male goat" in Old English was bucca (see buck (n.)) until late 1300s shift to he-goat, she-goat (Nanny goat is 18c., billy goat 19c.). Meaning "licentious man" is attested from 1670s. To get (someone's) goat is from 1910, perhaps with notion of "to steal a goat mascot from a racehorse," or from French prendre sa chèvre "take one's source of milk."