Jason Giambi got Jim Tracy off the hook and delivered his team a walk-off win.

Giambi hit a three-run homer in the bottom of the ninth inning Wednesday to lift the Colorado Rockies over the Los Angeles Dodgers, 8-5, in the finale of a three-game series.

Giambi's heroics came a half-inning after Tracy called for an intentional walk to Matt Kemp with two outs, leading to Dee Gordon's game-tying two-run double for the Dodgers.

Jamey Wright (1-1) walked Eric Young and Marco Scutaro to start the bottom of the ninth and Giambi smoked Scott Elbert's one-out fastball over the wall in right-center field to give the Rockies two wins in the series.

"All I was trying to do was get it up in the air in that situation," said Giambi.

Carlos Gonzalez hit two homers for Colorado, including a tiebreaking two-run shot in the bottom of the eighth inning off Clayton Kershaw.

The Rockies became the first team ever to hit three homers off Kershaw and were in line to be the first to beat the reigning NL Cy Young Award winner since last August until LA tied the game in the ninth.

Kershaw, who struck out six but gave up five runs in 7 1/3 innings, remained unbeaten in his last 15 starts.

The Rockies rallied for three runs in the eighth after Jerry Hairston had given the Dodgers a 3-2 lead with a two-run double in the top of the inning.

The top of the ninth was a disaster for Tracy and closer Rafael Betancourt.

Betancourt gave up a leadoff single to Adam Kennedy but fanned two straight batters before Tracy opted to intentionally walk Kemp, the NL Player of the Month and one of the hottest hitters in the league.

Gordon then lined a 2-2 pitch into the right-center field gap and Kemp scored all the way from first on a wide throw to the plate, tying the game.

Betancourt (1-0) got the win despite the blown save. Wilin Rosario also hit a solo homer for the Rockies and starter Drew Pomeranz struck out five in 6 2/3 innings, giving up one run on four hits and four walks. He left with a 2-1 lead but remained winless in four starts this season.

A.J. Ellis walked to lead off the third inning and scored later on a play at the plate after Mark Ellis' base hit, giving the Dodgers a 1-0 lead.

But Gonzalez tied the game for Colorado with a leadoff homer in the fourth inning, and Rosario made it 2-1 with a leadoff blast in the fifth.

The Dodgers had a runner on in the sixth inning when Hairston grounded out to third baseman Chris Nelson, whose throw to first pulled Todd Helton several feet off the bag.

First base umpire Tim Welke called Hairston out, ending the inning and drawing an animated protest from Dodgers manager Don Mattingly.

"It really doesn't matter at this point. I think he maybe missed [the call]," Mattingly said. "I just don't think he realized he came off the bag."

Matt Belisle relieved Pomeranz with runners at first and third base in the seventh and got Mark Ellis on a fly ball to end the inning.

The teams then combined for 10 runs in the last two innings starting in the eighth, when Kemp singled on Belisle's second pitch and hustled to third on Andre Ethier's one-out single off Rex Brothers.

Ethier moved up on Brothers' wild pitch, but Kemp remained at third. Hairston then doubled past Nelson at third -- Nelson slowed the ball down by diving to deflect it into foul territory and both runners scored to make it 3-2.

Before Gonzalez's seventh homer of the season gave the Rockies a 5-3 lead in the bottom of the eighth, Dexter Fowler knocked in Scutaro to tie the game.

Game Notes

Kershaw allowed just one homer in 33 1/3 innings this season before Gonzalez's leadoff blast in the fourth...The Rockies are 3-3 on a nine-game homestand that continues this weekend against the Atlanta Braves...The Dodgers continue a six-game road trip Friday with the opener of a weekend series in Chicago against the Cubs...The Rockies optioned pitcher Jhoulys Chacin to Triple-A.