Gonzalez hit his 25th homer and finished with four hits, helping the Rockies beat Pittsburgh 8-4 on Sunday to salvage a split of their four-game series against the last-place Pirates.
Colorado lost 8-7 on Saturday when Pirates rookie Pedro Alvarez hit a three-run homer with two out in the 10th inning.
"Our chance to win the series blew up last night, so we didn't have any other option but to split today," Gonzalez said. "We just showed up today very excited about this game. And that's why we won."
Summoned from Triple-A to start Sunday, Esmil Rogers (2-2) allowed four runs, three earned, and eight hits in six innings as the Rockies won for only the second time in their past 10 road games to pull within 4 1/2 of NL wild card-leading San Francisco.
Gonzalez went 4 for 5 with his eighth homer in his past 11 games, drove in three runs and scored twice, helping Colorado win for the seventh time in 10 games. He went 9 for 18 in the series and is batting .435 (30 for 69) with 16 RBIs in his last 16 games.
"I don't know what to say about what we're seeing and the development if this player," Rockies manager Jim Tracy said.
Said Gonzalez: "I'm just following the pitcher's sequence, that's been the key for me. I just watch the way they're pitching me the whole game so I kind of know what they're trying to do. That's the key about hitting -- if you know what's coming, you have more chances."
Gonzalez and Troy Tulowitzki combined to go 18 for 35 in the series. Tulowitzki reached base three times Sunday and has a .471 career batting average at PNC Park.
"Any time you have two guys who are swinging the bat as well as me and him are, your team's going to go," Tulowitzki said. "CarGo, he's unbelievable. It seems like every time I get up, he's on base, which makes it a little easier for myself. I'm sure he thinks the same way with me behind him. I can't say enough about him and what he's done this whole entire year."
With Dexter Fowler aboard in the first, Gonzalez homered for the fourth time in seven games against Pittsburgh this season. Colorado made it 6-0 in the second with consecutive RBI hits by Fowler, Clint Barmes, Gonzalez and Tulowitzki.
"We had a mountain to climb today because we got down big," Pirates manager John Russell said. "The guys weren't really worried about it and weren't feeling low because of what happened last night. They're still pretty up from that and they started to peck away."
Maholm (7-10) gave up eight runs, six earned, and seven hits. He has allowed 22 earned runs over his past four starts.
"It seemed like every time I threw a good pitch, they'd foul it off," Maholm said. "And then I'd make a mistake and leave one over the middle."
Daniel McCutchen, recently bumped from Pittsburgh's rotation, followed Maholm with 4 1/3 scoreless innings.
Rogers struck out three and walked one. He also doubled twice at the plate.
"When you've got an 8-1 lead, all you've got to do is throw a strike," Rogers said. "The batter can't get eight runs."
The Rockies have scored 21 runs in the last three games after failing to score as many as five in eight straight road games.
"I'm very, very pleased with their bounceback today after a tough loss," Tracy said.
"Good ballclubs wash it off. It's not about one game but six months of baseball."
The Pirates fired pitching coach Joe Kerrigan and bench coach Gary Varsho, replacing them with Ray Searage and Jeff Banister. ... McCutchen stole second after being hit by a pitch during the sixth inning, becoming the first Pirates pitcher to steal a base since Oliver Perez on May 17, 2006, against Cincinnati. ... The Rockies improved to 24-17 against left-handed starters this season. ... Colorado has won only one series at PNC Park since it opened in 2001.