mid-14c., "opposite, opposed, at the opposite point or in the opposite direction; extremely unlike, most unlike," from Anglo-French contrarie, Old French contrarie, and directly from Latin contrarius "opposite, opposed; contrary, reverse," from contra "against" (see contra). Meaning "given to contradiction, perverse, intractable" is from late 14c.; sense of "adverse, unfavorable" is from late 14c. Related: Contrarily.
As a noun from late 13c., "one of a pair of characters, propositions, terms, etc., the most different possible within the same class." The phrase on the contrary "in precise or extreme opposition to what has been said" is attested from c. 1400 as in the contrary.
If we take the statement All men are mortal, its contrary is Not all men are mortal, its converse is All mortal beings are men, & its opposite is No men are mortal. The contrary, however, does not exclude the opposite, but includes it as its most extreme form. Thus This is white has only one opposite, This is black, but many contraries, as This is not white, This is coloured, This is dirty, This is black; & whether the last form is called the contrary, or more emphatically the opposite, is usually indifferent. But to apply the opposite to a mere contrary (e.g. to I did not hit him in relation to I hit him, which has no opposite), or to the converse (e.g. to He hit me in relation to I hit him, to which it is neither contrary nor opposite), is a looseness that may easily result in misunderstanding; the temptation to go wrong is intelligible when it is remembered that with certain types of sentence (A exceeds B) the converse & the opposite are identical (B exceeds A). [Fowler]
c. 1400, "state or quality of being contrary, extreme opposition," from Old French contrarieté, from Late Latin contrarietatem (nominative contrarietas) "opposition," noun of quality from contrarius "opposite, opposed; contrary, reverse," from contra "against" (see contra (prep., adv.)). Meaning "something contrary to or extremely unlike another" is from mid-15c.
late 14c., of planets, "appearing to move in the sky contrary to the usual direction," from Latin retrogradus "going back, moving backward," from retrogradi "move backward," from retro "backward, reverse" (see retro-) + gradi "to go, step" (from PIE root *ghredh- "to walk, go"). General sense of "tending to revert" is recorded from 1530s; that of "directed backward, in a direction contrary to the original motion" is from 1620s. .