Brad Hawpe and Yorvit Torrealba had two hits each for Colorado, which lost for the first time under interim manager Jim Tracy, who replaced the fired Clint Hurdle on Friday.
Scott Hairston also homered and Heath Bell recorded his 15th save in 16 chances for the Padres, who salvaged the final game of the three-game series.
Gaudin (2-3) struck out eight through four innings before running into trouble in the fifth. He allowed consecutive one-out singles to Troy Tulowitzki and Torrealba, but pinch-hitter Seth Smith looked at strike three and Tulowitzki was caught stealing at third to end the inning.
Gaudin allowed two runs on seven hits and didn't walk a batter in 6 2-3 innings.
Colorado starter Jorge De La Rosa (0-6) gave up four runs on six hits in five innings. He struck out five and walked three.
The game was scoreless until the third. With one out, Tony Gwynn Jr. singled to left and David Eckstein doubled down the right-field line to put runners on second and third. Gonzalez then drove De La Rosa's 0-2 fastball over the 390-foot sign in left to give the Padres a 3-0.
They made it 4-0 in the fifth when Kevin Kouzmanoff's two-out double off the left-field wall scored Hairston, but the Rockies escaped further damage when Gonzalez was thrown out at home trying to score from first.
Hairston led off the seventh with his seventh homer to make it 5-0.
The Rockies broke through in the bottom of the inning. Garrett Atkins and Hawpe led off with singles, and Atkins moved to third on Ian Stewart's fly out to right. Hairston dropped Tulowitzki's routine fly to center, allowing Atkins to score from third, and Yorvit Torrealba singled to drive in Hawpe and make it 5-2.
Greg Burke relieved Gaudin and got the last two outs to end the rally.
Notes:@ According to the Elias Sports Bureau, Gonzalez's 20 home runs is the most by a Padre through May 31. The previous record was 17 by Greg Vaughn in 1998 and Nate Colbert in 1970. ... Padres manager Bud Black said RHP Jake Peavy (right ankle tendinitis) will make his scheduled start Tuesday against Philadelphia.