Giambi's blast came off L.A. reliever Scott Elbert, who had just entered the game to replace Jamey Wright.
Carlos Gonzalez had two home runs in the game, one in the fourth and one in the eighth. Both were off L.A. starer Clayton Kershaw.
Gonzalez now has seven homers on the year.
The Rockies (12-12) had a 2-1 lead entering the top of the eighth. A Jerry Hairston Jr. two-run double gave the Dodgers a 3-2 lead.
Then Dexter Fowler's single scored Marco Scutaro to tie the game 3-3 in the bottom of the eighth. Gonzalez then hit his second homer of the game, a two-run shot to give the Rockies a 5-3 lead entering the ninth inning.
The Dodgers (17-8) would not go away quietly. A two-run double by Dee Gordon off Rockies closer Rafael Bentancourt scored Adam Kennedy and Matt Kemp to tie the game. However, with two outs, the Dodgers were unable to get Gordon across the plate.
In the bottom of the ninth, pinch-hitter Eric Young Jr. drew a lead-off walk. Scutaro then drew another walk from Wright. Jonathan Herrera sacrificed Young Jr. and Scutaro to put runners on second and third, bringing Giambi to the plate against Elbert.
Wright (1-1) picked up the loss for the Dodgers. Bentancourt (1-0) picked up the win.
Each team had nine hits. Gonzalez was the only player on either team to have multiple hits.