What is the X in X-mas?
Old English apa "ape, monkey," from Proto-Germanic *apan (cf. Old Saxon apo, Old Norse api, Dutch aap, German affe), perhaps borrowed in Proto-Germanic from Celtic (cf. Old Irish apa) or Slavic (cf. Old Bohemian op, Slovak opitza), perhaps ultimately from a non-Indo-European language.
Apes were noted in medieval times for mimicry of human action, hence, perhaps, the other figurative use of the word, to mean "a fool." To go ape (in emphatic form, go apeshit) "go crazy" is 1955, U.S. slang. To lead apes in hell (1570s) was the fancied fate of one who died an old maid.
"to imitate," 1630s, but the notion is implied earlier, e.g. to play the ape (1570s), 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.
an animal of the monkey tribe (1 Kings 10:22; 2 Chr. 9:21). It was brought from India by the fleets of Solomon and Hiram, and was called by the Hebrews _koph_, and by the Greeks _kepos_, both words being just the Indian Tamil name of the monkey, kapi, i.e., swift, nimble, active. No species of ape has ever been found in Palestine or the adjacent regions.