Paul Goldschmidt homered and had two RBIs for the surging Cardinals, who began the day one game behind Cincinnati and San Diego for the second NL wild card.
New York entered three games behind the Reds and Padres.
The 40-year-old Wainwright, a thorn in the Mets' side since he saved Game 7 of the 2006 NL Championship Series by striking out Carlos Beltran with the bases loaded, allowed four hits in six innings. He walked three and struck out four as he outdueled 41-year-old New York starter Rich Hill.
Wainwright (16-7) had just one 1-2-3 inning but worked out of trouble by stranding seven runners, including the bases loaded in the first. New York left runners in scoring position in the fifth and sixth.
Wainwright is 9-2 with a 2.02 ERA in his last 12 starts, a span in which he's gone at least six innings every time.
Dylan Carlson laced an RBI double in the second and Goldschmidt delivered a run-scoring single in the third before homering leading off the fifth.
The Mets threatened against Alex Reyes in the eighth, when Francisco Lindor walked and Michael Conforto singled before Reyes struck out the next three batters.
Nolan Arenado, Yadier Molina, Edmundo Sosa and Harrison Bader all had RBI singles in the ninth.
Hill (6-7) allowed three runs on six hits and two walks with four strikeouts in five innings.
BETTER WITH AGE
It was the first time starting pitchers age 40 or older opposed one another since June 18, 2015, when 40-year-old R.A. Dickey started for Toronto against the Mets and 42-year-old Bartolo Colon.
Wainwright turned 40 on Aug. 30 while Hill, the oldest pitcher in the majors, turned 41 on March 11.
"The game's gone younger and 40's quite a hallmark number to get to,'' Cardinals manager Mike Shildt said.
Both pitchers displayed their versatile arsenals, which included fastballs in the high 80s (mph) and plenty of curveballs clocked in the low-to-mid-70s as well as at least two sliders by Hill clocked in the high 60s.
"You expect a chess match — executing pitches, lot of pitches with intent, lot of mix,'' said Mets manager Luis Rojas, who is two days younger than Wainwright. "Two guys that have been around in the league for a while now for a reason.''
The matchup marked the first time Wainwright has opposed a pitcher older than him since Oct. 2, 2016, when he faced 39-year-old Ryan Vogelsong.
First base umpire Junior Valentine remained in the game after being hit on the right side of his face by a throw from Sosa in the second inning.
The shortstop ranged beyond second base to field a grounder by Kevin Pillar before whirling and firing wildly toward first. The ball likely would have sailed into foul territory but hit Valentine, who was positioning himself to make the call and didn't see the ball as it hit him flush near his cheek.
Goldschmidt immediately waved for assistance. Valentine, with some blood on his face, stood up and conversed with his fellow umpires as well as a Mets trainer who applied a towel to the wound.
The announced crowd of 19,057 applauded as Valentine — a bruise already forming on his face — returned to his position. He exchanged grins and words with Pillar — who suffered facial fractures when he was hit square in the nose by a fastball in May — before Wainwright's next pitch.
Cardinals: RHP Dakota Hudson (Tommy John surgery) allowed one run in five innings for Double-A Springfield on Sunday night. It was the fourth rehab start for Hudson, who is expected to make another one Friday. â¦ RHP Jack Flaherty (right shoulder) is scheduled to throw a bullpen in St. Louis on Thursday.
Mets: C Tomas Nido (left thumb) joined the Mets for batting practice after playing back-to-back games for Triple-A Syracuse and could be activated Tuesday. â¦ OF Brandon Nimmo (right hamstring) took batting practice. â¦ RHP Noah Syndergaard (Tommy John surgery) had a touch-and-feel bullpen and could throw batting practice this week — his first time facing hitters since his rehab progression was shut down when he tested positive for COVID-19.
Cardinals: RHP Jake Woodford (2-3, 4.38 ERA) gave up one run in four innings against the Dodgers last Thursday in his return to the rotation.
Mets: RHP Marcus Stroman (9-12, 2.87) is slated to make his major league-leading 31st start.