San Diego, seeking their first playoff berth in four years, trail the Giants (91-70) by one game and could finish in a dead heat with them by completing a three-game road sweep of their climactic series Sunday.
The win also helped position San Diego for a shot at the wildcard post-season berth as they moved into a tie with the Atlanta Braves, who lost 7-0 to the Philadelphia Phillies and slipped to 90-70.
"For me, I've been treating these games like they're all playoff games," said Padres shortstop Miguel Tejada, who turned the twin-killing that ended the game. "We can't worry about who we might play. We can't worry about tomorrow. We don't have tomorrow."
Closer Heath Bell, who pitched out of a jam he created to notch his 47th save, said: "We've had Game 7 for the last two days now. Tomorrow's going to be Game 7 (again). We're going to put it all on the line."
For the second game in a row, the Padres got on the scoreboard quickly against the Giants' starting pitching, one of the strengths of the San Francisco team during the season.
Giants starter Barry Zito (9-14) lasted three-plus innings, giving up four runs on five hits and four walks.
"It's tough," Zito said. "Coming into the series, we knew we had to take one and now it's coming down to the last game. Unfortunately, I couldn't put it away today."
Tim Stauffer, who has bounced between relief and starting pitching this season for the Padres, went 6-1/3 innings for the win, improving to 6-5 as he yielded three hits and one run.
The Padres took advantage of some erratic play by San Francisco. Zito allowed two runs in the first inning on bases-loaded walks, and another run scored in the third on a throwing error by third baseman Pablo Sandoval.
Tejada singled in a run in the fourth to complete the scoring for San Diego.
San Diego led 4-1 going to the ninth and gave the ball yet again to closer Bell, for the fourth game in as many days.
Bell got the first out, but then allowed doubles to Pat Burrell and Juan Uribe and a single by Sandoval that put the score at 4-2 with men on first and third.
Pinch-hitter Jose Guillen then grounded to shortstop Tejada, who stepped on second and fired to first for the game-ending double play.
(Writing by Larry Fine, Editing by Frank Pingue)