Bumgarner (2-1) allowed two runs on seven hits and struck out two en route to the victory, which snapped a two-game Giants losing streak.
Nate Schierholtz and Buster Posey had three hits apiece for the Giants and Schierholtz drove in a run.
The Phillies were 1-for-11 with runners in scoring position, but the Giants went 2-for-14.
The Giants scored twice in the first inning and then scored twice in the fifth to take a 4-1 lead.
Trader Joe's: Car crashes into Long Island store, injuring 11
Ukrainian protestors topple Lenin statue [VIDEO]