Gonzalez and Kevin Kouzmanoff hit three-run homers off John Van Benschoten (1-3), who gave up seven runs, four extra-base hits and walked four in 1 2/3 innings of another miserable start. As a starter, the former first-round draft pick is 0-9 the last two seasons and 1-11 in his career.
Josh Banks (3-4) won for the first time in seven starts since June 19 despite giving up five runs and six hits in 5 2/3 innings. Jose Bautista's solo homer with two outs in the ninth created a save situation, with Hoffman retiring the only batter he faced for his 20th save in 23 opportunities.
This is Hoffman's 14th season with at least 20 saves, the most in major league history according to the Elias Sports Bureau. Lee Smith previously was the only other pitcher with at least 20 saves in 13 seasons.
"I'm proud that it was a good man I had an opportunity to bypass," Hoffman said. "Lee Smith had a tremendous career and I'm definitely a big fan of his accomplishments. I'm thankful my durability and consistency have been there."
Still, Hoffman didn't figure to pitch after the Padres had 11 hits while opening a 9-1 lead by the fourth inning, only to get one more hit the rest of the game.
"That's part of the role, you don't get caught up where the game is early," Hoffman said. "Something might happen and it's your job to stay focused."
Van Benschoten, in the majors for the third time this season but likely now to return to the minors, is one of the most glaring examples of the Pirates' many recent draft failures. He has a 10.48 ERA in nine games this season and a 9.04 ERA in 19 career starts, the highest in major league history for a pitcher with that many starts.
"He didn't throw well," manager John Russell said. "I don't know what else to say."
Van Benschoten got into trouble by walking Edgar Gonzalez and Brian Giles ahead of Gonzalez's long drive in the first that nearly cleared the lower-level grandstand in right-center. Giles walked again and Adrian Gonzalez doubled for the second of his three extra-base hits before Kouzmanoff's shot to left-center -- his 14th -- made it 7-1 in the second.
"I kept saying to myself, `I've got to find it, I've got to find it,' but, unfortunately, I never found it," Van Benschoten said. "It's frustrating."
After Franquelis Osoria replaced Van Benschoten, Nick Hundley hit his first career homer leading off the third and Gonzalez started the fourth with his 25th of the season and second of the game. Gonzalez matched his career highs with two homers and four RBIs.
"I was able to get some pitches that were comfortable to hit and that helped me a lot," Gonzalez said. "They were middle, middle away, where my strength is. It made it easier to get to the ball."
With the Pirates down by eight, manager John Russell pinch hit for starters Nate McLouth, Freddy Sanchez and Jason Bay in the fifth only to have his team score twice in that inning on Jason Michaels' pinch-hit homer and twice more in the sixth.
"We had to use our closer, we kept going to the bullpen, but we got it done," Padres manager Bud Black said.
The Pirates, with only 24 players in uniform after trading outfielder Xavier Nady and left-hander Damaso Marte to the Yankees, lost their second in a row after winning their previous four. San Diego is 17-35 on the road but has won on successive nights after dropping nine of 10.
In an unusual play, catcher Hundley drew an error when his throw to second base on Osoria's sacrifice attempt in the second inning struck umpire Ted Barrett, who was lined up a few feet to the side of the bag. The misplay didn't prove costly as Banks retired the next two hitters, and Barrett was uninjured despite taking a tumble. ... Padres RHP Chris Young, struck in the face by Albert Pujols' line drive May 21, threw a sideline session Saturday and remains on schedule to come off the disabled list and start Tuesday vs. Arizona. ... Pirates SS Jack Wilson's average has dropped from .299 to .270 since the All-Star break.