The right fielder smashed a homer with two runners on to cap a four-run eighth inning, and third baseman Matt Duffy had a four-hit game as the Giants pulled away late for an 8-3 victory over the Atlanta Braves on Tuesday night.
Shelby Miller was in line for his first victory since May 17 before Braves relievers imploded just as the Giants' bullpen had twice at crunch time Monday in the series opener.
"It was a good bounce-back," said San Francisco manager Bruce Bochy, whose team also took a late loss at Texas on Sunday. "That would have been another tough one for us, but it's a resilient group. That is what it's about, bouncing back."
San Francisco trailed 3-2 before the eighth-inning rally began with a double off Miller by center fielder Gregor Blanco, who scored four times. Lefty reliever Ross Detwiler entered, and Duffy hit an RBI double. Right-hander David Aardsma replaced Detwiler, and Pence followed an intentional walk to catcher Buster Posey with a blast to left-center field.
"I always feel good with Hunter at the plate," Bochy said.
Pence's seventh homer of the season came on a 1-2 fastball from Aardsma (0-1) and offered some relief from the Giants' stinging extra-inning loss the night before.
San Francisco (58-48) scored two ninth-inning insurance runs, the first on a homer by left fielder Nori Aoki off rookie Ryan Kelly, and moved back to within two games of the first-place Los Angeles Dodgers in the National League West.
"I wouldn't say we're watching the standings yet, but we're aware," Duffy said. "We know what's going on and how important it is to take care of our business."
Atlanta, which trailed 6-0 on Monday, tied that game with a two-run homer by catcher A.J. Pierzynski in the ninth inning, then won 9-8 in the 12th on third baseman Adonis Garcia's three-run, walk-off blast.
It looked as if the Braves (48-59) might have another comeback victory when they scored twice in the seventh inning off the Giants bullpen. The rally put Miller, an All-Star who gave up four hits and two runs over seven-plus innings, in line to end his losing streak at seven games and win for the first time in 14 starts.
"You know it's going to be a battle against him, but we were able to get his pitch count up and get him out of the game," Duffy said.
"We're frustrated," said Miller, who has a 2.44 ERA but gets the least run support of any pitcher in the majors. "This is kind of a game of momentum, and when you lose it, it goes quick."
Giants starter Jake Peavy also wasn't involved in the decision despite allowing just five singles and a run over six innings. He struck out eight and walked one, but the bullpen couldn't protect a 2-1 lead after his exit.
Right-hander George Kontos allowed three consecutive seventh-inning singles, with pinch hitter Pedro Ciriaco delivering the tying run with one out. Left-hander Jeremy Affeldt got right fielder Nick Markakis to hit a grounder to second baseman Ehire Adrianza, but the lead run scored when the rookie could get just one out instead of a double play.
Affeldt (1-2) ultimately got credit for the victory.
The Giants took the lead in the sixth inning with the aid of a mistake by Braves first baseman Chris Johnson, who forgot the number of outs.
With the bases loaded and one out after two walks around a single, Johnson ran to the bag to retire Pence rather than throw home on a sharp grounder.
"I screwed up," Johnson said. "Stupid mental error."
The Giants scored in the first inning. Posey followed singles by Blanco and Duffy with a sacrifice fly for his first of two RBIs.
The Braves tied it in the third when Pence couldn't hold on to complete a diving catch. Second baseman Jace Peterson, who singled and moved up on a sacrifice, scored as Markakis stretched his hitting streak to 11 games.
Miller retired 13 straight batters from the first inning into the fifth, but again had nothing to show for his effort.
"It kind of unraveled on us and he doesn't get any decision, but he was great," Braves manager Fredi Gonzalez said. "He was dominant throughout the whole game."
NOTES: Braves 1B Freddie Freeman, back for just 10 games after missing 30 because of a bruised right wrist, went on the disabled list with a right oblique strain. He was hurt on a swing in the series opener Monday. ... RHP Jason Frasor (shoulder strain) was also placed on the DL by the Braves, who recalled 1B/OF Joey Terdoslavich and RHP Ryan Kelly from Triple-A Gwinnett. ... Atlanta SS Andrelton Simmons (right thumb bone bruise) missed his third straight game. He isn't expected back until at least the weekend. ... CF Angel Pagan (sore knees) was again out of the Giants' lineup, but he might start Wednesday, manager Bruce Bochy said. ... The series concludes Wednesday night with Giants LHP Madison Bumgarner (11-6, 3.39 ERA) starting against Braves rookie RHP Williams Perez (4-1, 4.14).