A close contest or a strong competition, as in We may not win the game, but let's give them a run for their money. This term probably comes from horse racing, where one may get considerable pleasure from watching the race even if one does not win much. Its first recorded use was in 1874.
The American Heritage® Idioms Dictionary Copyright © 2002, 2001, 1995 by Houghton Mifflin Harcourt Publishing Company. Published by Houghton Mifflin Harcourt Publishing Company.