SAN FRANCISCO (AP) -- Madison Bumgarner just missed clearing the fences his first time up, hitting a sacrifice fly to the warning track in left field.
The pitcher left no doubt the second time he faced Colorado Rockies starter Jorge De La Rosa.
Bumgarner hit a grand slam and drove in a career-high five runs to overcome a shaky outing on the mound, sending the San Francisco Giants to a 6-5 victory Friday night.
Bumgarner hit a sacrifice fly off De La Rosa in the third inning, then connected for a towering home run in the fourth. It was Bumgarner's third career homer and only the second grand slam by a Giants pitcher since the team relocated from New York to San Francisco in 1958.
"They don't really expect a whole lot out of pitchers so we get to go up there with no pressure," Bumgarner said. "It's easier to hit that way, but at the same time it's the hardest thing to do in sports."
Shawn Estes is the only other San Francisco pitcher to hit a grand slam. He did it against Montreal on May 24, 2000, in an 18-0 blowout of the Expos.
Bumgarner's homer came with the Giants trailing 3-1, and his five RBIs wound up being the difference in the game.
"That's quite a night," San Francisco manager Bruce Bochy said. "He wasn't quite as sharp (on the mound) but he found a way to win the game and he did it with his bat. Good for him."
Brandon Crawford added two hits and scored twice for the Giants.
Carlos Gonzalez homered for Colorado, which played short-handed after injuries sidelined two of its top hitters.
"Any time you're facing Bumgarner you know it's going to be a tough at-bat," Gonzalez said. "He threw me a 3-2 curveball and there's no way I'm sitting on it. I just reacted ... but things changed after that."
Bumgarner (2-0) struck out seven and walked two in six erratic innings. He allowed nine hits and appeared headed for a short night until the Giants scored five runs in the fourth.
His home run came on a day when both teams were minus key players.
Troy Tulowitzki's sore quadriceps kept him out of Colorado's starting lineup. He pinch-hit in the ninth and struck out looking against closer Sergio Romo to end the game.
The Rockies also were without catcher Wilin Rosario, who hurt his left wrist while sliding during Wednesday's 8-1 win against the Chicago White Sox.
San Francisco played with a jumbled lineup as Bochy rested catcher Buster Posey and center fielder Angel Pagan.
There were still plenty of offensive fireworks.
Gonzalez hit a two-run shot off Bumgarner in the third to put the Rockies up 3-0. The ball landed in McCovey Cove, the second time Colorado's slugger has reached the waters beyond AT&T Park.
Bumgarner, a right-handed batter, came a few feet shy of homering off De La Rosa (0-2) in the third and hit a sacrifice fly to drive in Crawford, who led off the inning with a triple.
There was no doubt about Bumgarner's drive in the fourth. He sent De La Rosa's first pitch deep into the left field stands for his first home run since 2012.
De La Rosa, Colorado's opening day starter, failed to make it out of the fifth for the third consecutive start. He struck out six and walked two.
"It looked like his command got away from him," Rockies manager Walt Weiss said. "He had his 'A' game early, then it got away from him."
Bumgarner wasn't sharp either and labored most of the game. He threw 112 pitches and gave up four runs, ending a streak of 21 consecutive starts in which he allowed three earned runs or fewer.
Colorado cut it to 6-5 on Charlie Blackmon's pinch-hit single off reliever Santiago Casilla in the eighth but made two baserunning blunders.
Blackmon strayed too far off second and was thrown out after Casilla made a nice play to spear Jordan Pacheco's fielder's choice. Pacheco then got doubled up when San Francisco center fielder Juan Perez caught DJ LeMahieu's flyball and threw to first.
Romo struck out the side in the ninth for his third save.
The Rockies went up 1-0 in the first when leadoff hitter Brandon Barnes singled and later scored from third while Josh Rutledge was caught trying to steal second.
Rutledge started in place of Tulowitzki and went 3 for 4.
NOTES: Gonzalez has five career home runs off Bumgarner, the most given up by the San Francisco lefty. ... LHP Brett Anderson (0-2) pitches Saturday against San Francisco RHP Matt Cain (0-1).