1550, "the mental process of reasoning," later, "the relation of one number to another" (1660s), then "fixed allowance of food or other means of subsistence for a fixed period of time" (1702, often rations, from French ration in this sense).
All are from Latin rationem (nominative ratio) "reckoning, numbering, calculation; business affair, procedure," also "reason, reasoning, judgment, understanding," in Medieval Latin "a computed share or allowance of food." This is from rat-, past participle stem of reri "to reckon, calculate," also "think" (from PIE root *re- "to reason, count").
The first sense listed for the English word is obsolete; the second has gone with ratio. The military pronunciation (rhymes with fashion) took over in English from the preferred civilian pronunciation (rhymes with nation) during World War I. That war also gave the word a specific sense of "officially limited allowance for civilians in times of war or dearth" (by 1917).