Wainwright (9-6) allowed three runs and six hits in an 85-pitch stint. He struck out five and walked one in his 176th career victory.
Jorge Polanco homered for the Twins, who have lost four of five.
The 39-year-old Wainwright, who’s spent his entire 16 seasons in the majors with the Cardinals, beat Minnesota for the first time in his career. He’s beaten 26 of the other 29 teams in the big leagues — he is 0-1 against Texas, Baltimore and the New York Yankees.
“I don't know if I'll be able to chip those away,” Wainwright said.
Wainwright made his first appearance against Minnesota since a 3-1 loss on June 26, 2009.
Alex Reyes picked up his 25th save in 26 opportunities with a 1-2-3 ninth inning.
Wainwright’s biggest contribution may have come in a fourth inning at-bat. He battled Minnesota starter Michael Pineda (4-6) for 10 pitches before hitting a hard grounder to third baseman Luis Arraez, who threw a one-hopper that Miguel Sano was unable to handle at first base. Edman scored on the error to put St. Louis ahead to stay 3-2.
“It was a very impressive moment,” Sosa said.
Wainwright fouled off six pitches, four with two strikes.
“What a winner,” St. Louis manager Mike Shildt said. “A tremendous at-bat. He worked his tail off.”
Wainwright also added a pair of sacrifice bunts. A good showing at the plate for him — normally a decent hitter for a pitcher, he's just 1 for 34 (.029) this season.
“I've been working really hard on it,” Wainwright said of his hitting stroke. “I know I have nothing to show for it. My numbers look horrible, the worst in the game, probably. But I've been taking better at-bats. Really working on my strike zone discipline.”
Pineda downplayed Wainwright's fourth-inning plate appearance.
“It did not affect me at all, had nothing to do with today's outing,” Pineda said.
His manager, Rocco Baldelli, disagreed calling it, “a big moment in the game.”
“The longer the at-bat went, it looked like the more comfortable he got,” Baldelli said.
Pineda surrendered three runs, two earned, on five hits over four innings.
The Twins took a 2-0 lead on a two-run single by Andrelton Simmons in the first inning.
MOLINA MOVES UP
HILL TO CLIMB
The Cardinals finished July 9 1/2 games behind first-place Milwaukee in the NL Central. The last time they were that far behind entering August was 1999 when they were 11.5 games back of Houston with a 52-52 mark.
MOVING ON IN
St. Louis LHP J.A. Happ will make his first start for the Cardinals on Wednesday against Atlanta. Happ (5-6, 6.77) was acquired from Minnesota in exchange for RHP John Gant and LHP Evan Sisk on Friday,
Twins: INF Josh Donaldson missed his third successive game with a hamstring issue.
Cardinals: RHP Jack Flaherty tossed three innings in his second rehab start at Triple-A Memphis on Sunday. He gave up two runs on four hits. He struck out five and walked one. Flaherty was placed on the 60-day injured list on June 1 with a left oblique strain.
Cardinals: LHP Jon Lester (3-5, 5.02) will make his Cardinals debut in the first game of a three-game set against Atlanta LHP Max Fried (7-7, 4.32) on Tuesday. Lester was acquired from Washington in a trade for OF Lane Thomas at the deadline. Lester has pitched at least five innings in all 13 career starts against the Braves.
Braves ride big 5th inning to win, extend NL East lead
— Austin Riley had three doubles and three RBI, Adam Duvall added a two-run homer and the Atlanta Braves extended their lead in the NL East by beating the Arizona Diamondbacks 11-4 on Monday night.
Adam Duvall launches mammoth 483-foot homer in Braves' win
Adam Duvall pulverizes the second-longest Braves home run over the last 15 years in the team's victory over the Diamondbacks.
Martin Maldonado's 3-run HR doubles Astros' lead
Martin Maldonado's three-run home run to center field puts the Astros up by six runs.
Valdez, González, Maldonado send Astros past Angels 10-0
— Framber Valdez pitched seven innings of six-hit ball, Marwin González hit a grand slam and the Houston Astros moved closer to the AL West title with a 10-0 victory over the Los Angeles Angels on Monday night.
Kyle Seager carries offensive load for Mariners in win vs. A's
Kyle Seager hits an RBI double in the third inning and follows up with an RBI single in the fifth inning as the Mariners go on to win 4-1 over the A's.
Seager's three RBIs help Mariners stop A's 5-game win streak
— Oakland's starting pitchers had been so dominant during this recent stretch until Kyle Seager and Seattle swung away and took it to Sean Manaea.