Gaudin (5-2) allowed one run and four hits, striking out five. He also got his first career RBI on a single that was just his second hit in 59 at-bats.
Roger Kieschnick had RBI singles in his first two major league at-bats for the Giants, who snapped a nine-game homerless drought when Pill went deep. Pill had three hits and four RBIs.
Kyle Kendrick (9-8) gave up eight hits and seven runs in two-plus innings.
REDS 4, PADRES 1
SAN DIEGO (AP) — Homer Bailey came within two outs of a five-hit shutout to end his four-start losing streak and Cincinnati beat San Diego to snap a five-game skid.
Brandon Phillips homered and Joey Votto hit a two-run double for the Reds, who avoided a three-game sweep and ended the Padres' four-game winning streak.
Bailey had allowed just five singles going into the ninth, when Everth Cabrera reached on a fielding error by first baseman Votto leading off the inning. The right-hander got Chris Denorfia to fly out before Chase Headley doubled in Cabrera. Manager Dusty Baker pulled Bailey, and Aroldis Chapman got the final two outs for his 25th save in 29 chances.
Bailey (6-10) allowed six hits and one unearned run, struck out seven and walked none.
Phillips homered to center field off lefty Eric Stults (8-10) leading off the second, his 13th.
MARLINS 3, METS 2
MIAMI (AP) — Jake Marisnick hit his first major league home run and Henderson Alvarez pitched into the eighth inning to lead Miami over New York.
Giancarlo Stanton and Placido Polanco also drove in a run each for the Marlins, who dropped the first two games of the four-game series with the Mets.
Mike Dunn got four outs for his second save in place of Steve Cishek, who pitched two innings and took the loss in Tuesday's 4-2 loss to New York.