Antonym was borrowed from French antonyme, probably formed back from antonymie on the model of synonyme. Its Greek ancestry combines anti- with -ōnymos.
Anti- also had the sense in place of.
Sources
- Merriam-Webster: antonym
Greek anti- and -ōnymos express opposition and having a name.
- Online Etymology Dictionary: acronym
Acronym: acro- + -onym “name”, a form abstracted from homonym