Old English apa (fem. ape) "an ape, a monkey," from Proto-Germanic *apan (source also of Old Saxon apo, Old Norse api, Dutch aap, German affe), probably a borrowed word, perhaps from Celtic (compare Old Irish apa, Welsh epa) or Slavic (compare Old Bohemian op, Slovak opitza), and the whole group probably is ultimately from an Eastern or non-Indo-European language.
The common word until the emergence of monkey in 16c. More technically, in zoology, "a simian; tail-less, man-like monkey" 1690s. The only native apes in Europe are the Barbary apes of Gibraltar, intelligent and docile, and these were the showman's apes of the Middle Ages. Apes were noted in medieval times for mimicry of human action, hence, perhaps, the other figurative use of the word, to mean "a fool" (c. 1300).
To go ape "go crazy" is by 1953 (unsanitized or emphatic go apeshit is by 1954), American English; early attestations suggest armed forces slang. To lead apes in hell (1570s) was the fancied fate of one who died an old maid. Middle English plural was occasionally apen. Middle English also had ape-ware "deceptions, tricks."
"to imitate," 1630s, but the notion is implied earlier, as in the phrase play the ape (1570s), and Middle English apeshipe "ape-like behavior, simulation" (mid-15c.); and the noun sense of "one who mimics" may date from early 13c. Related: Aped; aping.