CINCINNATI -- Randal Grichuk thought he had a three-run home run in the sixth inning Wednesday that would have tied the score, but replay confirmed the ruling of a double.
There was no debating his game-winner seven innings later.
He launched his 13th homer of the season, on a 1-0 pitch from right-hander Dylan Axelrod (0-1), into the left field seats late on a long night for both teams.
"You know the ball flies here," Grichuk said. "(Hitting a homer) is always in the back of your mind, but you have to keep the same approach."
Third baseman Matt Carpenter hit a game-tying solo homer off J.J. Hoover in the eighth for St. Louis, which ended a three-game losing streak against the Reds.
"I was trying to throw a fastball up and away, but I pulled it across the plate middle in," Hoover said. "That's not what I wanted to do."
Seth Maness (4-1) pitched two scoreless innings to earn the victory. He was one of six Cardinals relievers who blanked the Reds over the final eight innings.
"The bullpen was tremendous," Maness said. "Every guy that came in was trying to match the last guy. We just passed the ball."
Cincinnati led 3-0 through five innings and appeared poised to clinch consecutive series victories against St. Louis for the first time since 2011. The Reds (48-57) will have another chance Thursday in the finale of the three-game series.
"It was a well-pitched ballgame by both sides," Reds manager Bryan Price said. "It came down to one swing of the bat. It's a disappointing loss. We were able to string things together, but we couldn't come up with that knockout blow. We had a 3-0 lead. We just couldn't put it away."
The Cardinals (68-39) didn't threaten against Reds starter David Holmberg until the sixth, when the first two batters reached via a walk and a hit batsman.
Grichuk started the rally with a double off the top of the left-center-field wall to drive home a run, cutting the Reds' lead to 3-1.
Following a four-minute, one-second review by crew chief Ted Barrett, it was confirmed to be a double after Cardinals manager Mike Matheny argued that the ball might have cleared the yellow padding.
After allowing only two hits and two runs in five-plus innings, Holmberg was done for the night.
For the second straight night, Reds center fielder Billy Hamilton preserved a one-run lead with a diving catch, this time of second baseman Kolten Wong's sinking liner to end the seventh.
However, Carpenter's solo homer on a 2-2 pitch from Hoover in the eighth tied the score 3-3.
The game-tying blast took Cardinals right-hander Carlos Martinez off hook after he allowed three runs (one earned) in five innings.
"He didn't have his fastball command today," Matheny said. "He survived with his slider. The ball was coming out of his hand, but his timing was off."
Martinez pitched out of jams in the first two innings but wasn't as fortunate in the third.
With the bases loaded and two outs, catcher Brayan Pena laced a double down the left field line, driving in two runs to make the score 2-0. It was Pena's second consecutive double, giving him 11 for the season.
Reds third baseman Todd Frazier drove in a run with a bases-loaded grounder in the fourth, making the score 3-0.
For the second consecutive game, Martinez had a rough time. He allowed five earned runs and 10 hits in five innings last week against the Colorado Rockies.
"That's part of being a young pitcher," Matheny said. "He'll be fine."
NOTES: St. Louis improved to 7-8 in extra-inning games this season. ... Reds LHP Sean Marshall threw a 22-pitch bullpen session composed mostly of fastballs. It was his first appearance on the mound since June 10, 2014, after he tore his left shoulder labrum. He will travel with the team through his rehab. ... Cardinals CF Randal Grichuk, who had two hits for the second game in a row, was moved up to second in the batting order. He came in batting .385 in his past seven games. ... Reds LHP Aroldis Chapman made his 24th consecutive scoreless appearance against the Cardinals, striking out three in the ninth inning. St. Louis hasn't scored against Chapman since 2011.