In a sport that is dominated by owners who can spend the most money for the best-bred horses, storybook tales don't happen very often.

But at Belmont Park today, two rags-to-riches stories came true in the space of an hour.

John Henry, a gelding who was originally sold for $1,100 and formerly ran in $20,000 claiming races, won the Jockey Club Gold Cup, becoming the top money-winning thoroughbred of all time and virtually clinching the title of horse of the year.

His triumph came just after Timely Writer, an equally ill-bred animal whose sire resided on a cattle ranch in Idaho, won the prestigious Champagne Stakes and established himself as the best 2-year-old in the country.

Inasmuch as his whole career has been the stuff of implausible fiction, it was only appropriate that John Henry scored his greatest victory in a dramatic, cliffhanger finish. He held off the late charge of the 50-to-1 shot Peat Moss by a head, then survived a foul claim by Peat Moss' jockey.

Even though his humble background made John Henry everybody's sentimental favorite to win the Gold Cup, the unsentimental New York bettors had their doubts about him, sending him to the post at a lukewarm 3 to 1. While John Henry had won $2.4 million in his career, and had captured six of seven starts this year, he had achieved most of his success on the grass.

But on Belmont's main track today, everything broke right for him and jockey Bill Shoemaker.

"He has a tendency to loaf and he'll loaf on you at any time," Shoemaker said. But John Henry's loafing in the early stages of this race worked to his advantage, as the horses in front of him waged an enervating battle for the lead.

Nobody wanted to let Noble Nashua steal this race by setting a slow early pace, as he had done in the Marlboro Cup three weeks ago. So the leaders raced the first half-mile in a swift 48 seconds, while John Henry stalked them in perfect striking position.

Summing, the Belmont Stakes winner, made a strong move on the rail to take the lead at the end of the backstretch, but Shoemaker kept waiting. Then, on the turn, he asked John Henry for a response, swung outside Summing and took command.

In midstretch he looked as if he had the race under control, until Peat Moss, a former $10,000 claiming horse with inexhaustible stamina, came charging up the rail and gaining with every stride. "Another jump and Peat Moss would have won," his trainer Gil Puentes lamented.

But the distance of the Gold Cup was not 1 1/2 miles and one jump. John Henry covered the mile and a half in 2:28 2/5, unsensational time on a fast track.

John Henry paid $8.20, $5.80 and $3.80. Peat Moss returned $27.20 and $8. The mare Relaxing, another three-quarters of a length behind at the finish after losing much ground on the turn, paid $3.40 to show.

"This horse is so great," exclaimed John Henry's trainer Lefty Nickerson. "It's so inspiring to see him run. This definitely makes him the horse of the year."

The Gold Cup also makes John Henry a very rich horse. His earnings of $340,800 bring his career total to $2,805,310, eclipsing Spectacular Bid's mark.

Timely Writer has a long way to go before he reaches such preeminence, but the 2-year-old started his career in the same humble fashion as John Henry. The son of a stallion named Staff Writer, whose existence was unknown even to most breeding experts, Timely made his debut in a $30,000 claiming race. But he won the Hopeful Stakes at Saratoga this summer, and today he probably clinched the juvenile championship with his decisive Champagne victory over the previously undefeated filly Before Dawn.

Before Dawn, the odds-on favorite, rushed up along the rail on the backstretch as a pack of a half-dozen horses battled for the lead. She took commmand on the turn, was headed by one of her male rivals and fought back again.

Jockey Jeffrey Fell had let Timely Writer relax in the early stages, but when he launched his rally on the turn, he did it with such authority that the outcome became immediately obvious. He drew away through the stretch to a 4 3/4-length victory over the filly.