SAN DIEGO -- Brian Giles has been around too long to let a season-opening slump get him down.
The Padres were coming off a 4-4 trip to New York, Philadelphia and San Francisco, during which Giles went 6-for-37. He was hitting .159 overall entering Friday night's game.
"That was really great to see," manager Bud Black said of Giles' winning hit. "I think we all know Brian and what he means to our team. For me, it's just a matter of time before you see a lot of those hits like you saw tonight."
Chris Burke started the winning rally by drawing a one-out walk off Matt Capps (0-1) and stole second with two outs before David Eckstein walked. That brought up Giles, who singled to right field to bring in Burke.
On the road trip, Giles hit three long flyballs that would have been homers had they been fair, then made outs.
"That's just part of the grind of the game and how mental it is," he said. "Fortunately I've been through it and I know I can still play at this level and be productive. I think it's fun to come here and get ready to play a game every day with the type of guys we have. When we take the field, everybody believes we're going to win that day."
Giles, the No. 3 hitter, said the most frustrating thing is that teams are geared up to not let cleanup hitter Adrian Gonzalez beat them. Gonzalez did hit a solo homer for San Diego's first run.
"I've had pitches, I just haven't put consistent swings on them," Giles said.
Capps said he threw a fastball where he wanted.
"I think if I do it 100 more times, I'm going to be successful 99 of them," he said. "It's hard to throw him something else when he's not hitting my fastball."
The loss snapped a three-game winning streak for the Pirates, who had won five of their previous six.
Edwin Moreno (1-2) allowed one hit in two innings for his first big league win.
Kevin Correia was trying for his first win with his hometown Padres but couldn't hold a 3-1 lead in the sixth. He walked Adam LaRoche leading off the inning and Eric Hinske reached on a double when Giles couldn't hang onto his flyball after leaping against the right-field wall. Cla Meredith came on and allowed Brandon Moss' RBI groundout and Andy LaRoche's RBI single to center.
Jason Jaramillo singled and stole second before Nyjer Morgan was intentionally walked to load the bases for Jack Wilson, who was hitless in his previous three at-bats. Wilson struck out to end the threat, tossing his bat and helmet in disgust.
Correia allowed three runs and three hits.
Pirates starter Ian Snell gave himself a 1-0 lead when he hit an RBI single to center with two outs in the second.
It didn't last long, though, as Gonzalez homered to center on Snell's first pitch in the bottom half for his sixth of the season.
San Diego added on with four more extra-base hits in the next two innings. Luis Rodriguez doubled leading off the third and scored on David Eckstein's triple into the left-field corner. Chase Headley opened the fourth with a double into the right-field corner and scored on Nick Hundley's double to left-center.
Snell allowed three runs and six hits in five innings. He had two hits and made a nifty catch of Jody Gerut's line drive to end the fourth with the bases loaded.
Pirates CF Nate McLouth was scratched with an injured right oblique. ... Gonzalez, San Diego's only All-Star last year, took Moss' liner off the heel of his glove in the 10th. Trainers tended to him for a few minutes, and Black said he should be fine. ... San Diego OF Cliff Floyd, who's been on the disabled list since opening day with a strained right shoulder, had an MRI and a shot on Thursday. The team said it will monitor Floyd for a week. ... San Diego RHP Cha Seung Baek, on the DL since just before the season started, threw 45 pitches in a bullpen session and appears close to starting a rehab assignment.