Andrew Cashner surrendered just one run on three hits over six-plus frames, while Joaquin Benoit (5-3) earned the win for tossing a scoreless eighth for the Padres, who have won the first two of this four-game set.
Starter Michael Wacha gave up a run and five hits with six strikeouts over seven innings in a no-decision, while Jason Heyward scored the lone run for the Cardinals, who have dropped four straight on the heels of a six-game winning streak.
“When you don’t get the little things done in games like these, it’s not going to work out for you,” St. Louis manager Mike Matheny said.
Yangervis Solarte tripled to the warning track in right off Trevor Rosenthal (1-1) with one out in the ninth and Gyorko plated him with a base hit to left for a 2-1 lead.
“We have to be able to come in here and win games like this,” Gyorko said. “It comes down to getting that big hit.”
Craig Kimbrel worked around a one-out single in the ninth for his 21st save of the season.
The Cardinals opened the scoring in the fifth. Heyward and Yadier Molina each singled to place runners on the corners and Randal Grichuk worked a walk on a nine-pitch at-bat to load the bases. Heyward raced home after Xavier Scruggs hit into a double play.
Gyorko tied the game with a solo shot to left field to begin the seventh.
Benoit took the mound in the eighth and hit Scruggs with a pitch. Peter Bourjos came on to pinch-run, stole second and took third on a groundout. Benoit left him stranded by fanning Greg Garcia and getting Kolten Wong to fly out.