Gonzalez, who had just four RBI in his previous 14 games, drove in three runs and had three hits as the Padres beat Houston 5-2. The three RBI gave Gonzalez a team-leading 56.
The Padres, who snapped a three-game losing streak, remained in first place in the NL West with a 56-52 record.
Clay Hensley (7-8) picked up the victory allowing one run and four hits in 5 2/3 innings. He walked one and struck out four.
Trevor Hoffman came on and pitched a perfect ninth for his 29th save in 33 opportunities. It was his 465th career save, 13 shy of Lee Smith's all-time record of 478.
Leadoff batter Dave Roberts helped fuel the Padres offense with a double, two singles and his 31st stolen base.
Matt Albers (0-1) made his first major league start and gave up five runs and eight hits in five-plus innings.
"I felt pretty comfortable out there," Albers said. "Everything was working pretty good. I had a little trouble throwing a curveball strike to the lefties, other than that I felt good."
Gonzalez and Roberts, both batting lefty, combined for six of the 10 hits with Gonzalez delivering an RBI single in the fourth and a two-run single with the bases loaded in the fifth.
"Today was a big day for us, first of all not to get swept and second of all to get back on a winning streak," Gonzalez said. "Every at-bat I had with runners on base I was really telling myself 'Get it done, just get it done.'
"It was great getting up and having Dave on base all day. He picks up the pace of the rest of the lineup."
While the Padres were scoring more than four runs for the first time since July 27, at Colorado, it was Henley's performance that had teammates talking.
"Hensley's outing today was the biggest thing all day for us," Gonzalez said. "He kept us in the game the whole time, kept the ball in play and we feed off of guys who can do that."
Gonzalez said he was more worried about what pitch to swing at than worrying about having runners on base.
"My mindset is look for a pitch I can handle and I can drive and don't go after a pitcher's pitch," he said. "It's been working for me with men on base and without men on base."
The Padres took a 1-0 lead in the fourth. Brian Giles drew a leadoff walk and advanced to third on a groundout. Gonzalez followed with an RBI single.
The Padres added three runs in the fifth to make it 4-0 on an RBI single by Mike Cameron and a two-run single by Gonzalez.
The Astros got on the board in the sixth. Willy Taveras reached on a bunt single, went to second on an infield grounder and scored on Ensberg's grounder through the left side of the infield.
The Padres added their fifth run in the sixth inning when pinch-hitter Geoff Blum doubled and scored on an RBI single by Roberts.
The Astros scored an unearned run in the seventh. Eric Munson reached on a fielding error by second baseman Josh Barfield. He went to second on a grounder and scored on a pinch-hit double by Orlando Palmeiro off Cla Meredith.
"I would have hoped that after a good game yesterday we would have had a better offensive showing today," Astros manager Phil Garner said, referring to Wednesday's 7-1 victory. "We just fizzled. Two runs aren't good enough to win. We just need to get our offense on a roll."
Scott Linebrink came on to pitch a scoreless eighth for the Padres.
"It was a well-played game for us," Padres manager Bruce Bochy said. "Hensley threw the ball very well, the bullpen did a great job. We had some key hits and Gonzalez is playing that kind of ball that you come to expect him to come through with runners on. He's having quite a year and you hate to think where you'd be without him."
- Padres SS Khalil Greene sprained the middle finger on his left hand while hitting in the fourth. He left for a pinch hitter in the sixth. "It's day-to-day right now," Bochy said. "He had X-rays that were negative and we're going to do some more tests. We'll know more tomorrow."
- Meredith worked one inning to extend his scoreless streak to 10 1/3 innings. He hasn't surrendered a run since July 18 against Philadelphia.
- Albers, who made two relief appearances this season, threw 8 1/3 scoreless innings before surrendering his first run on the RBI single by Gonzalez in the fourth.