Brandon Crawford drilled the game-winning single with none out in the bottom of the ninth to lift San Francisco to its ninth win in 11 games.
Brandon Belt drew a leadoff walk off San Diego reliever Joe Thatcher (0-4) and Angel Pagan followed with a ground single to left. Both runners moved up on a passed ball by Padres catcher Yasmani Grandal before Crawford smacked the decisive hit to center field.
Santiago Casilla (4-4) worked a scoreless ninth as the Giants beat the Padres for the second straight night to improve their National League West lead over the Los Angeles Dodgers to 2 1/2 games.
San Diego’s Edinson Volquez and San Francisco’s Madison Bumgarner each pitched seven stellar innings.
Volquez held the Giants hitless over his last six innings and struck out eight while allowing two runs, three hits and three walks. Bumgarner struck out nine and allowed two runs, six hits and two walks in seven innings.
San Francisco bunched together three hits against Volquez in the open inning with one run scoring on Melky Cabrera’s infield out and the second on Pablo Sandoval’s booming double to right-center field.
San Diego tied the game with a two-run second. Jesus Guzman doubled home one run and he scored later in the inning when Volquez hit a two-out single to center for his second career RBI.
The Padres had a chance to take the lead in the eighth inning when Carlos Quentin drilled a ball to deep left-center field with Chase Headley on first. Pagan made a sensational diving grab and cutoff man Brandon Crawford’s throw to first doubled off Headley to end the inning.
Notes: Quentin was back in the lineup after sitting out a game with knee soreness and went 1-for-3. … Sandoval, playing first base, left the game in the third inning with a strained left hamstring suffered while stretching to catch an out. … Guzman is 8-for-19 against Bumgarner after going 2-for-3 against him Tuesday. … Cabrera reached on an infield single in the eighth to extend his hitting streak to 11 games.