1867, coined to serve as opposite of synonym, from Greek anti- "equal to, instead of, opposite" (see anti-) + -onym "name" (see name (n.)). Perhaps introduced to English in the book "Synonyms and Antonyms" (1867) by the Ven. C.J. Smith, M.A.
French antonyme (1842), German antonym (by 1859) are older. The un-Greek alternative counterterm has been left to fade.