ST. LOUIS — Jedd Gyorko has gotten plenty of big hits during his second-half. He got the biggest hit of his career Saturday.

Gyorko connected for a go-ahead home run in the eighth inning, Matt Holliday provided another boost off the bench and the St. Louis Cardinals pushed the playoff race to the final day of the regular season, beating Pittsburgh 4-3.

The Cardinals began the day one game behind San Francisco for the second NL wild-card spot. The Giants later hosted the Los Angeles Dodgers.

Adam Wainwright is set to start Game No. 162 for St. Louis on Sunday against the Pirates. Either the Cardinals or Giants will play at the New York Mets on Wednesday night in the wild-card game.

Gyorko's solo shot came on a 100-mph fastball from Felipe Rivero (1-6). Gyorko became the first Cardinals player to hit 30 homers in a season since Carlos Beltran in 2012.

"These are exciting games, no doubt about that. To be in a must-win situation, it's fun to be out there," Gyorko said.

Gyorko has a career high in home runs, with 23 of those coming after the All-Star break.

"Jedd's been so impressive," Cardinals manager Mike Matheny said. "I mean 30, that's without even being in there every single day."

The home run came on the ninth pitch of the at-bat. Three pitches earlier, home plate umpire Alfonso Marquez called ball three on a pitch that the Pirates thought was strike three. Rivero had actually started to walk back to the dugout thinking the inning was over.

"I think he had strike three and sometimes they don't get called," Pirates manager Clint Hurdle said. "I think that was the situation that happened."

The Cardinals tied it with a three-run sixth, highlighted by Holliday's RBI pinch-hit single. Holliday had a pinch-homer on Friday night after the Cardinals said they wouldn't pick up his $17 million option.

"Holliday taking that at-bat right there. I'm sure he could have hung his hat on that at-bat last night and I think it shows a lot of selflessness that he goes right back out there today," Cardinals reliever Trevor Rosenthal said.

Kevin Siegrist (6-3) pitched a scoreless eighth. Seung Hwan Oh stranded runners at second and third for his 19th save in 22 opportunities.

Rosenthal anchored what became a bullpen game for the Cardinals when starter Michael Wacha was pulled after one inning. Rosenthal, who started the season as the closer, pitched three scoreless innings in relief, striking out four while throwing a career-high 52 pitches.

Jung Ho Kang's three-run homer in the first off Wacha was his sixth home run against the Cardinals this season. Kang's eight career homers and 21 RBIs against St. Louis are his most against any team in the majors.

Pirates starter Chad Kuhl struck out five and gave up two runs in five-plus innings.

"We had to have extra ordinary effort from our bullpen today and that was just impressive from beginning to end and all the way through," Matheny said. "Just overall a great effort from the entire team."

JUST MAKING SURE

Cardinals SS Aledmys Diaz hit a ball in the bottom of the first to the same part of the left field wall where Yadier Molina's game-winning double went on Thursday. Originally called a ground-rule double, umpire crew chief Larry Vanover called for a review, which confirmed the call.

TRAINER'S ROOM

Pirates: Starling Marte (back) was out of the lineup and isn't expected to play in the season finale on Sunday.

UP NEXT

Pirates: RHP Ryan Vogelsong (3-7, 5.00 ERA) is one strikeout away from No. 900 in his career. He is 3-7 with a 6.02 ERA in 23 career appearances (12 starts) against St. Louis.

Cardinals: Wainwright (13-9, 4.67 ERA) has failed to make it through six innings in four of his last five starts, but he earned the win on four of them. He is 13-7 with a 4.26 ERA in 32 career appearances against Pittsburgh.