It's just 'again' with a parasitic '-t' that Middle English speakers tacked on for no clear reason.
In opposition or resistance to; in contact with; in preparation for; in contrast to.
From Middle English ageynes, ageines, from Old English ongean (toward, opposite, against) with an adverbial genitive -es suffix that became -st by analogy with superlatives. Old English ongean is composed of on- (on, in) + gean (direct, straight), from Proto-Germanic *gagn- (against, toward), from PIE *gheghn- (to go toward, meet). The Proto-Germanic root also produced
The word 'again' and 'against' were originally the same word — Old English 'ongēan.' The '-st' ending on 'against' is a parasitic consonant with no etymological function, added purely by analogy with words like 'amongst' and 'whilst.' Similarly, 'gainsay' (to contradict) preserves the old 'gain-' form of this root
Words closest in meaning, ranked by similarity