From Proto-Italic *anti, from Proto-Indo-European *h₂énti, locative singular of the root noun *h₂ent- (“front, front side”).
Cognates include Ancient Greek ἀντί (antí, “opposite, facing”), Sanskrit अन्ति (ánti), Old Armenian ընդ (ənd), Tocharian B ānte, and English and.
The change from PIE ablative to Latin accusative is like the confrontational accusative used with Ancient Greek παρά (pará).