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 Greek mathematical term given a wider sense by Plato. The 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.
compound adjectival word-forming element, usually interchangeable with -ic but sometimes with specialized sense (such as historic/historical, politic/political), Middle English, from Late Latin -icalis, from Latin -icus + -alis (see -al (1)). Probably it was needed because the forms in -ic often took on a noun sense (for example physic). Forms in -ical tend to be attested earlier in English than their twins in -ic.
<a href="https://www.etymonline.com/word/analogical">Etymology of analogical by etymonline</a>
Harper, D. (n.d.). Etymology of analogical. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/analogical