early 15c., "correspondence, proportion," from Old French analogie or directly from Latin analogia, from Greek analogia "proportion," from ana "upon, according to" (see ana-) + logos "ratio," also "word, speech, reckoning," from PIE root *leg- (1) "to collect, gather," with derivatives meaning "to speak (to 'pick out words')."
A mathematical term given a wider sense by Plato. Meaning "partial agreement, likeness or proportion between things" is from 1540s. In logic, "an argument from the similarity of things in some ways inferring their similarity in others," c. 1600.