Wainwright (1-0) pitched out of a bases loaded, no-out jam in the second, giving up just one run. He retired 14 of the final 15 batters he faced as the Cardinals beat the Pirates for the 12th time in their last 13 games.
The veteran had trouble regulating his body temperature early on as the heat index soared above triple-digits.
''It's just certainly, especially when you get to be the old owl on the team, things get a little harder as you get older, so you got to figure out ways and tricks, little ways to stay in the game,'' Wainwright said. ''For me, I looked around behind me at my defense and I knew they had it. So, I tried to attack the zone.''
John Gant, Tyler Webb and Daniel Ponce de Leon combined for three scoreless innings of relief as the Cardinals pitchers held the Pirates to just three hits.
Wainwright's 163rd career victory moved him into a tie with Bob Forsch for third-most wins in Cardinals history.
''He's still in the process of being able to compete so you know he was going to have a shorter rope in the sixth, but he went 1-2-3, made his quality pitches,'' Cardinals manager Mike Shildt said. ''He's a warrior guy, and third all-time with Forsch, that's pretty impressive.''
Wainwright continued his dominance against Pittsburgh at Busch Stadium, where he hasn't dropped a decision to the Pirates since June 29, 2012. He has pitched at least five innings in all 19 career home starts against the Bucs.
''I thought the cutter was good,'' Pirates manager Derek Shelton said of Wainwright. ''That's one thing we talked about in the pregame. He's been pitching for a long time, and he is able to execute pitches and change his stuff throughout his career.''
Dexter Fowler and Tyler O'Neill broke a 1-all tie with RBI singles in the fourth inning.
Paul DeJong's two-run single in the seventh gave him four RBIs through the season's first two games. Matt Carpenter followed with a two-run double that broke the game open.
''I think everyone has like a mental switch, where they can basically go and attack where we want to attack and so I think that focus level and that plan has really been our difference,'' DeJong said.
With his two-run triple in the eighth, Tommy Edman has now hit safely in 20 consecutive games dating back to Sept. 10, 2019.
Pirates starter Trevor Williams (0-1) gave up three runs in 4 2/3 innings. He gave up just two runs in two starts all last season against the Cardinals.
Josh Bell singled and scored the Pirates' lone run.
Goldschmidt's 381-foot solo homer gave the Cardinals a 1-0 lead in the first. He has hit safely in 11 of 12 home games against Pittsburgh since joining St. Louis.
It was the 266th time Yadier Molina has caught a Wainwright start, the most for a duo in Cardinals history and seventh-most in Major League History (since 1908).
Pirates: OF Gregory Polanco (COVID-19) passed all return protocols and worked out at PNC Ballpark. There is no timetable on his return.
Cardinals: RHP Giovanny Gallegos showed more consistency with his pitches during live batting practice. He will throw another BP round on Sunday.
The Pirates send RHP Mitch Keller (1-5, 7.13 ERA in 2019) to the mound against the Cardinals and RHP Dakota Hudson (16-7, 3.35 ERA in 2019) in the finale of a three-game series on Sunday. Keller, who has never faced St. Louis, entered the season as the team's top pitching prospect. Hudson has won his last five starts against NL Central foes, including one against Pittsburgh on July 23, 2019.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Copyright 2020 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.