Vogelsong (7-3) scattered seven hits and walked one to pull the Giants to one game behind the National League West-leading Dodgers, who have dropped seven of their last eight games.
Melky Cabrera had a solo home run in the two-run Giants fourth inning. Pablo Sandoval drove in San Francisco's other run.
Clayton Kershaw (5-4) had won his past four starts at AT-and-T Park but took the loss Tuesday, allowing two runs on eight hits in six innings.
'How to Train Your Dragon 2' releases 5-minute clip
Turkey considering to use pistachios to heat country’s first eco-city