Flores earned his first big league win by allowing only a single in the first four extra innings, before pinch-hitter Antonio Perez drew a bases-loaded walk with two outs in the 14th to cap a hitless rally and give the Athletics a 6-5 win.
Oakland avoided a three-game sweep in a matchup of the top two teams out West.
"I almost had to tackle him, but I got it from him," the left-hander said. "I'll remember that one for a while. It's pretty cool. It was his second career save and my first big league win."
If Flores' spot in the order hadn't come up in the 14th, he would have gone back out.
"Seriously, I was at the point where I probably wouldn't even have thrown warmup pitches in between innings. I was pretty loose already by then," he said.
After Oakland closer Huston Street squandered a two-run lead in the ninth to let the Padres tie it at 5, Flores pitched a perfect 10th and 11th. He allowed Brian Giles' leadoff single in the 12th. Josh Bard struck out and Adrian Gonzalez hit into an inning-ending double play, then Flores threw a perfect 13th.
"I got a lot of early outs, a lot of first- or second-pitch outs using the changeup a lot," Flores said. "It's late in the game, and a home run wins it for them, so there's a bunch of guys trying to finish the game. If you make quality pitches early in the count, you're going to get a lot of popups and weak grounders. Luckily I didn't hang anything on the first pitch or second pitch, and they kept getting themselves out."
The Padres even used Chan Ho Park, who's scheduled to start Friday night against San Francisco, as a pinch-hitter in the 13th. Park, batting .360, flied out to end the inning.
"I'm thinking, there's no way I'm throwing a first-pitch fastball here," Flores said. "I threw a changeup just to slow his eyes down a little bit. It's kind of funny to go changeup, fastball, changeup to another team's pitcher, but it's the 13th inning, so what are you going to do?"
The A's rallied against Scott Cassidy (4-4) in the 14th without getting a hit. They had three walks, including one intentional, a hit batsman and a sacrifice.
Perez, hitting .082, pinch-hit for Flores and got ahead of Cassidy 3-0. The right-hander threw two strikes, then missed outside to bring in Marco Scutaro, who drew a leadoff walk.
"It's one of those things," said Bard, San Diego's catcher. "Scott's done a good job for us and we have complete confidence in him."
Giles, the Padres' right fielder, ended the top of the 11th by throwing out Mike Rouse, who tried to score the go-ahead run on Jason Kendall's single. Giles gloved the short hop and threw a one-bouncer to Bard, who went up the first-base line to field it, then dove to tag Rouse.
Gaudin pitched the 14th for his second save. With two runners on, Giles lined into a game-ending double play - Mike Cameron was doubled off second by second baseman Rouse.
The Padres twice tied the game in the late innings.
Bard hit a two-run single off Street with two outs in the ninth to tie the score at 5. The runs were unearned because of first baseman Dan Johnson's error on a pickoff attempt. It was Street's second consecutive blown save and sixth this season.
Jay Payton put the Athletics ahead 5-3 with a two-run homer with two outs in the eighth, his fourth. Payton, San Diego's center fielder in 2004, had three hits and scored twice. Eric Chavez, who went to high school in San Diego, was aboard on a leadoff walk.
Cameron hit an RBI triple with one out in the seventh to tie the score at 3. That got ace Jake Peavy off the hook for what would have been his ninth loss this season. Peavy left after six innings, trailing 3-0.
Oakland's Dan Haren had a one-hitter through five shutout innings before allowing consecutive homers to Adrian Gonzalez, his 11th, and Mark Bellhorn, his sixth, with two outs in the sixth, pulling the Padres to 3-2.
Haren gave up two runs and three hits in six innings, struck out seven and walked four.
Peavy threw 114 pitches in six innings, allowing three runs and seven hits, with eight strikeouts and two walks.
Bobby Kielty hit an RBI double and Marco Scutaro an RBI groundout in the second. Bobby Crosby's RBI single in the third made it 3-0 Oakland.
"We couldn't figure out Flores," Padres manager Bruce Bochy said.
- Oakland's Nick Swisher struck out a career-high five times to tie the franchise record. He's the sixth player in A's history to do it, including Hall of Famers Lefty Grove and Reggie Jackson.
- The Padres came into the game with the NL's best ERA at 3.89.
- It was the sixth time this season the Padres hit consecutive homers.