Kelly (5-6) shut out the Mets over six innings, eventually yielding a two-run homer to Kelly Shoppach in the seventh. The St. Louis hurler allowed two walks and struck out four en route to the victory.
The Cards scored what turned out to be the decisive run in the bottom of the seventh on Allen Craig's RBI single, which put St. Louis ahead 5-2.
New York tightened the contest in the eighth on a two-run homer by Daniel Murphy against Mitchell Boggs and appeared to be on their way to another run when Andres Torres doubled to lead off the ninth.
But he was called out on appeal by first base umpire David Rackley, who ruled Torres had failed to touch the bag on his way to second.
Mets starter Collin McHugh (0-1) was touched for four runs on six hits over four complete innings as New York dropped the opener of a three-game series.
Rosie O'Donnell unveils nearly 50-pound weight loss
Putin thinks Obama would save him if he were drowning