According to the Free Dictionary, the figurative meaning of to give a run for someone's money is "to be as good as someone."
But what's the literal meaning of the sentence?
I actually think the "figurative meaning" you cite isn't quite correct. I would say that the (most common) figurative meaning of "to give someone a run for their money" is "to challenge someone."
But the literal origin of the phrase comes from horse racing. To want a run for your money is to want a horse that you have placed a bet on to participate in the race. Sometimes a horse is withdrawn from a race after bettors have already placed money on it; those bettors did not get a run for their money. From the OED:
2007 Racing Post (Nexis) 14 Jan. 9 Jayo was sent off the well-backed favourite in the 2m juvenile hurdle, but supporters never got a run for their money as he was pulled up lame behind.
Conversely to give someone a run for their money is to give a good race (even if you don't win) in return for their backing. This latter usage also suggests challenging the other horses in the race; hence its contemporary figurative meaning:
2009 Herald-Times (Bloomington, Indiana) 15 May d4/4 A home-wrecking catfight to give Uma Thurman and Daryl Hannah a run for their money.
From the very first Google result for "run for one's 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.
The original meaning comes from the horse-racing world and just looking at the results in google books it was simply 'to give it a try and hope for some luck'.
It is an odd fact that both Acrobat and Rifleman won the Great Yorkshire Stakes in 1854-58 in a canter, and then fell at Doncastcr before mere outsiders; and the remembrance will doubtless encourage owners to have a run for their money, just for the luck of the thing.
The most literal meaning is that punters will get good value out of the bets they have put down.
When he knew in the winter that the public were on the horse to a man, he said, "Then they shall have a run for their money"
This meaning is also naturally extended to competitiveness:
If any of the nearby Alumni Associations want a run for their money, we will be glad to take them on.
Since you didn't ask for the origin, I will answer with a plausible story that fits the image:
A person pays a lot of money to get a ride in a jet fighter. The pilot can go as slow and level as possible for a short amount of time, or the pilot can do high G turns, fly at tree level, and generally induce air sickness. The second option is a run for their money.