Bumgarner (8-4) notched his first career home run with a solo shot in the third. He allowed two runs -- one earned - on six hits and a dozen strikeouts over 7 2/3 innings t earn the victory.
Santiago Casilla came in to record the final out of the game and was rewarded with his 17th save of the season.
Brandon Belt belted a two-run homer and Melky Cabrera had an RBI single for the Giants, who have won seven of their last 10 games.
Brian Bixler drove in two runs for the Astros, who are 4-and-6 in their last 10 starts.
Bud Norris (5-4) took the loss after allowing three runs on three hits over 3 1/3 innings. Norris left the game in the fourth inning with a knee injury.
Beautician charged with giving client fatal silicone butt injection
Duggar sisters unveil Christian dating rules in new book