Andrew McCutchen finished 3-for-5 with three RBI and two runs scored, as Pittsburgh outslugged San Francisco, 12-8, in the second edition of a three-game series.
Neil Walker homered among his two hits and also drove in three runs for the Pirates, who have taken the first two in the series and four of five overall thanks to setting a new season high for runs in one contest.
"The offense is coming around and we're scoring a lot of runs," McCutchen said of his team's recent success. "We were able to score enough runs tonight."
Russell Martin added two RBI, while Starling Marte ended up with four hits and scored four times.
Francisco Liriano (5-2) did well enough to win, allowing eight hits and four runs over his six-inning start.
Joaquin Arias picked up a pair of hits and drove in three runs for the Giants, losers in four of their last six. Buster Posey added two RBI, while Hunter Pence doubled twice, scored twice and added a run driven in.
Barry Zito (4-5) was pulled after 4 2/3 frames, having surrendered 11 hits and eight runs for San Francisco, which played without the services of manager Bruce Bochy.
"Too many fastballs up in the zone," Zito said. "If you're not throwing your fastball down in the zone your other stuff's not quite as effective."
Bochy was suspended for one game earlier on Wednesday after he was held responsible for pitcher George Kontos plunking McCutchen in Tuesday's setback after both benches were warned. Kontos drew a three-game ban, but was protected for the time being since he was optioned to Triple-A Fresno.
The hosts exploded in the bottom of the fifth to break open a tie game. Marte led off with a single and stole second, then Jordy Mercer singled and Gaby Sanchez walked. Martin's grounder to first plated a run, then Pedro Alvarez followed with an RBI double to chase Zito. Jose Mijares entered, only to give up a two-run hit from Walker which made it 8-4.
Presley began the home sixth with his first homer of the season, a pinch-hit blast to right for a five-run margin, and Marte continued the rally with a single and stolen base before coming in on a Sanchez double.
San Francisco climbed within 10-6 in the seventh after Pence's fielder's choice grounder compounded by a Mercer error scored Tony Abreu and left Pence at second, then Arias followed with a single to score Pence.
Walker's leadoff blast provided an 11-6 lead for the hosts in the bottom half, but Posey closed the gap to three with a two-out, two-run dobule in the eighth.
In the bottom portion, McCutchen and Sanchez both singled with one down to put runners on the corners and Martin's grounder to third brought in McCutchen for a 12-8 score.
Jason Grilli brought the deluge of runs to a halt in the ninth, retiring the side in order.
Both sides traded runs in the first, with the Giants striking on a Pence RBI double and the Bucs counter-punching on a run-scoring hit from McCutchen.
Pittsburgh picked up three more in the home third thanks to a two-run double by McCutchen and Martin's double-play grounder.
A Juan Perez sacrifice fly scored Pence with two outs in the fourth, then Arias slugged a two-out, two-run single with the bases loaded in the fifth to forge a 4-4 deadlock.
Pittsburgh's previous best offensive output came in an 11-2 win over the Mets on May 11 ... Mercer ended up with three hits and scored twice, while Abreu picked up three hits and scored on three occasions in defeat ... The loss marked the third time Zito failed to work at least five innings this season, with the last time coming in a 3 2/3-inning start at San Diego on April 27.