Andres Torres stroked an RBI single in the seventh inning to pull the Giants into an 8-8 tie and later came in to score on Huff's sacrifice fly off Manuel Corpas (2-5).
Huff then added a pair of insurance runs in the ninth with a long homer to right, helping the Giants get their first win since June 25.
Travis Ishikawa socked a third-inning grand slam and Pablo Sandoval knocked in a pair of runs for San Francisco.
Denny Bautista (2-0) got the win despite allowing the go-ahead run as Colorado scored four times in the sixth to erase a 7-4 deficit.
Rockies starter Ubaldo Jimenez failed in his bid to win his 15th game. He was pounded for seven runs on five hits over six innings.
Ray Liotta sues skin care company over use of likeness
Boston schools pull out free condoms over wrapping complaints