Pill, who was recalled from Class AAA this week and has played in less than 80 major league games scattered over four seasons, went 3-for-4 in helping the Giants snap a five-game losing streak.
Eight San Francisco batters came up in the first inning against Kyle Kendrick (9-8) and the Giants produced five hits to quickly take control.
Pablo Sandoval and Roger Kieschnick both had an RBI single in the first and Pill drove in two runs with another base hit. Pill also had a run-scoring, infield single during a three-run third and he hit a solo homer in the seventh.
San Francisco piled up 14 hits in support of Chad Gaudin (5-2), who allowed four hits and a run in seven innings for the win.
Philadelphia failed to build on its victory over the Giants on Tuesday and lost for the ninth time in 10 games.
Celebrity Families of 2014 [PHOTOS]