Harvey (3-4) gave up three runs on four hits in the tell-tale second inning, then shut the door the rest of the way.
"I was impressed with how he went about his job," Mets manager Terry Collins said. "[Pitching coach] Dan [Warthen] and I were sitting on the bench after the three-run inning, and we kind of looked at each other and said, 'Now we'll see what we've got. Let's see if he shuts this sucker down.' He did. He had to work hard, but he did it. You looked up in the fifth inning, and it's still 3-0."
That battle-back ability brought a smile to the face of Collins.
But not the University of North Carolina product, who was extremely displeased with his five-inning performance.
"What I did tonight, in my opinion was [bad]," Harvey said. "I'm not happy about it. I want to go out there and go deeper in the game. I've got to get quicker outs and I've got to keep the pitch count down, and I didn't do that tonight."
Harvey -- who has thrown 157 1/3 innings and will likely have one, maybe two more starts this season due to an innings limit -- gave up three earned runs on six hits. He struck out four and walked three. Harvey had given up two runs or fewer in his last four starts with a 2-1 mark and a 2.08 ERA in that span.
Despite the loss, Collins was pleased with Harvey's courage and determination. He held the Cardinals scoreless on two hits in four of his five innings. He did not allow a hit in either of his last two frames.
"He's an impressive guy to be around, " Collins said. "He's upset that he didn't pitch good tonight. But he pitched OK."
Cardinals manager Mike Matheny was happy to bunch together three runs in the second inning against Harvey.
"You can see why they're excited about him," Matheny said. "He has very good stuff."
New York (64-72) lost for the second time in as many nights after winning three successive games in Miami.
The Mets had won three consecutive series for the first time this season before losing the first two games of this three-game set.
Harvey wasn't the only Mets pitcher to turn in a gutsy effort on Tuesday.
New York right-hander Jeurys Familia, called up on Tuesday, made his Major League debut, entering the game at the start of the eighth inning. He gave up no runs and one hit. Familia struck out pinch-hitter Lance Berkman with a 97-mph fastball to lead off the inning. He gave up a single to Jon Jay, but then got Matt Carpenter to ground into a inning-ending double play. Familia threw nine pitches.
"I felt good warming up in the bullpen," Familia said. "I prepared my mind and tried to focus."
New York managed nine hits off St. Louis left-hander Jaime Garcia (4-6), who went 7 1/3 innings.
Trailing, 5-0, the Mets pushed across a run in the eighth. Pinch-hitter Justin Turner and Ruben Tejada singled before St. Louis shortstop Daniel Descalso booted a potential inning-ending double-play ball to load the bases with one out. Pinch-hitter Mike Baxter brought in Turner with a sacrifice fly. Cardinals left fielder Adron Chambers ended the threat by making a running catch on a deep drive from Daniel Murphy.
The Cardinals used four successive hits to plate three runs in the second. Yadier Molina, David Freese, Skip Schumaker and Descalso singled to give the Cards a 2-0 lead. Carpenter drove in Schumaker with a sacrifice fly to left.
Mets reliever Justin Hampson, recalled on Tuesday, came on at the start of the sixth and allowed one run in one inning. The 32-year-old appeared in three games earlier in the season without allowing a run. Hampson, who grew up in nearby Edwardsville, Ill., was making his first appearance in St. Louis in his 83rd Major League game.
New York, which is 0-for-14 with runners in scoring position in the series, fell to 5-3 on the current nine-game trip.