"bring together," c.1600, from French rallier, from Old French ralier "reassemble, unite again," from re- "again" (see re-) + alier "unite" (see ally (v.)). Intransitive meaning "pull together hastily, recover order, revive, rouse" is from 1660s. Related: Rallied; rallying. Rally round the flag (1862) is a line from popular American Civil War song "Battle Cry of Freedom."
"make fun of, tease," 1660s, from French railler "to rail, reproach" (see rail (v.)).
1650s, originally in the military sense of "a regrouping for renewed action after a repulse," from rally (v.1). Sense of "mass meeting to stir enthusiasm" first attested 1840, American English. Sense of "gathering of automobile enthusiasts" is from 1932, from French rallye, itself from the English noun. Sports sense of "long series of hits" in tennis, etc., is from 1881, earlier "series of back-and-forth blows in a boxing match" (1829).