With the score tied 2-2 in the seventh, Brandon Crawford singled with one out against Cardinals starter Tyler Lyons and Gregor Blanco followed with a walk.
Randy Choate came in to face pinch-hitter Belt, who greeted him by lacing a 1-1 pitch into the left-center field gap that rolled to the wall, sending home both runners.
Buster Posey went 4-for-4 with a run scored for the Giants, who avoided a sweep in a rain-shortened three-game series.
Gaudin (1-1), a full-time reliever since 2010, earned the victory, holding St. Louis to two runs on four hits in a six-inning effort.
Lyons (2-1) was charged with his first big-league loss in his third start, yielding four runs on eight hits while going 6 1/3 frames.
David Freese clouted a two-run homer for the National League Central-leading Cardinals.
Notable deaths of 2014 [PHOTOS]