The Giants have won three in a row to ensure they will not finish last in the National League West.
Juan Perez hit a two-run homer to give the Giants a 2-1 lead in the second, but Jedd Gyorko had an RBI double in the third to bring the Padres back into a tie.
Belt then hit a two-run homer in the bottom half of the inning and Hunter Pence added a solo shot later in the frame.
The only San Francisco runs that did not score on a homer came when Gregor Blanco drew a bases-loaded walk in the sixth and then had an RBI triple in the eighth.
Ryan Vogelsong (4-6) claimed the win by holding the Padres to two runs on five hits over six innings.
Burch Smith (1-3) labored while throwing 106 pitches over 5 2/3 innings. He allowed six runs on eight hits to take the loss.