1650s, originally in the military sense of "a regroup for renewed action after a repulse," from rally (v.1). Sense of "mass meeting to arouse group support" first attested 1840, American English. Sense of "gathering of automobile enthusiasts" is from 1932, from French. Sports sense of "long series of hits" in tennis, etc., is from 1887.
"bring together," c.1600, from French rallier, from Old French ralier "reassemble, unite again," from re- "again" (see re-) + alier "unite" (see ally). Related: Rallied; rallying. Rally round the flag (1862) is a line from popular American Civil War song "Battle Cry of Freedom."