also rat race, 1934 in reference to aviation training, from rat (n.) + race (n.1).
A rat race is ... a simple game of "follow the leader" in fighter planes. The leader does everything he can think of — Immelmanns, loops, snap rolls, and turns, always turns, tighter and tighter. [Popular Science, May 1941]
In the 1930s actual rat races of some sort are frequently mentioned among popular carnival and gambling attractions. Meaning "fiercely competitive struggle," especially to maintain one's position in work or life is by 1939. Rat-run is from 1870 in the sense of "maze-like passages by which rats move about their territory," but originally and usually in a derogatory transferred sense.
[Matthew] Milton was not, at the period we write of [c. 1811], at all in the ring ; for in the following March he was steward of a rat-race, held at a public-house in Shepherd's-market, where four of these "varmin," decorated with different coloured ribands, were started for a sweepstakes, round the clubroom, before a host of sportsmen. ["Sporting Incidents at Home and Abroad," The Sporting Review, May 1848]
"evolutionary development of biological races," by 1946, from race (n.2) + ending from speciation, etc.
"the running of races, the occupation or business of arranging for or carrying on races," originally especially horse races, 1670s, verbal noun from race (v.).
in La Raza, literally "the race," 1964, from American Spanish (see race (n.2)), "designating the strong sense of racial and cultural identity held by Mexican-Americans" [OED].
"one who or that which races," 1640s of persons, 1660s of horses, 1793 of vehicles, by 1809 in American English in reference to a type of snake; agent nouns from race (v.).
WHEN a lad, I lived with my father in the then province of New Jersey, where the black snake, with a white throat, commonly called the racer, as well as the rattle snake, and other serpents, are frequently met with ; and I never remember to have heard any one dispute the power of charming belonging to several species of serpents, but more common to the black snake, called the racer, which I have twice seen in the operation. ["Extract from a letter from Samuel Beach, dated Whiting, July 24, 1795," in appendix to Samuel Williams, "The Natural and Civil History of Vermont," 2nd ed., 1809]