Vogelsong (2-2) allowed only Seth Smith's fifth-inning single, issued one walk and fanned five while tossing 62 of his 97 pitches for strikes.
Javier Lopez and Clay Hensley each hurled a scoreless inning to finish the one-hit shutout for San Francisco, which clinched its three-game Bay Area rivalry series.
The Giants broke open a scoreless tie with four runs in the seventh, capped by Angel Pagan's two-run single.
Oakland's Tyson Ross (2-4) was saddled with the loss despite allowing only a pair of runs over six innings. He yielded seven hits, walked four and struck out four.