"We really didn't want to come in here and get swept," Bailey said. "We've been pitching really well and we were just trying to go out there and end this trip on a good note."
Bailey, who took a shutout into the bottom of the ninth, gave up one unearned run and six hits with seven strikeouts for his first victory since throwing a no-hitter against the Giants on July 2.
Entering the day, Cincinnati had scored just five runs over its past five games, totaling 47 innings. No pitcher in the Reds' rotation was more desperate for run support than Bailey. He was 0-4 with a 4.68 ERA in his four starts since the no-hitter while his lineup averaged two runs per game. The Reds were shut out four times in his past 21 games, scored one or no runs seven times, and scored two or fewer runs 11 times.
"The law of averages was on our side to win on the road and for Homer to win," Reds manager Dusty Baker said. "It's been a long time since he has won. There were some big hits we got today that had been eluding us the last few days. It's great to have a great flight home, take a day off and sort of take it easy and lick our wounds so to speak and get back at it."
The third-place Reds open a key three-game series against the suddenly struggling second-place Cardinals on Friday at Great American Ball Park.
One of the Reds' big weaknesses much the season, two-out hitting, proved big in their favor during a pivotal three-run seventh in San Diego. It was a 1-0 game against Padres starter Eric Stults when a costly Padres error opened the door for more runs.
With Zack Cozart on second base, Derrick Robinson reached on third baseman Chase Headley's throwing error. Chris Heisey followed with a softly lined RBI single to left field that scored Cozart. Joey Votto then ripped a two-run double to right field.
"That's the difference every day," Baker said of two-out hitting. "In San Francisco, we got a lot of those. In L.A., we got none and here we got none. That's big if you can get those two-out, RBI knocks. They're hard to get, and the other team, it breaks their back."
Also encouraging was the three-hit game for Brandon Phillips, who has been struggling since the All-Star break and entered batting .178 his last 12 games. Phillips staked Bailey to a 1-0 lead in the second inning when he hit a 1-2 Stults pitch to center field for his 13th home run of the season. It was Phillips' first homer since July 2, however.
"Brandon looked good and put us on the board," Baker said. "It was good to see him swinging again."
It wasn't an entirely clean game though. In the third inning, with two on and no outs and the team's best hitter in Votto at the plate, Robinson was caught trying to steal third base. It cost the Reds more runs as no one scored when Phillips hit a two-out single.
The rest was up to Bailey, and he did not disappoint. Now 3-0 with a 2.05 ERA in three career starts at Petco Park, the right-hander had complete control throughout. All of San Diego's hits were singles, including two in the infield. Two of the hits were later rendered moot by double plays.
"Bailey was good, held his velocity," Padres manager Bud Black said. "He did a nice job at the top of the zone, a good split-finger to the lefties, a couple good breaking balls to the righties and good fastball command. We just couldn't seem to square the fastball well. He had good movement. He's got that capability, he's got a good arm."
Bailey took the mound for the ninth already at 107 pitches. Votto muffed leadoff batter Everth Cabrera's grounder to first base for his career-high 12th error of the season. It came back to haunt the Reds when Headley scorched a one-out RBI double through the gap in left-center field.
Closer Aroldis Chapman was summoned for the final two outs and notched his 25th save in his first outing since giving up a walk-off homer in Monday's 2-1 loss.
"When they changed pitchers, you kind of cool down a little bit," Bailey said. "I felt good. I definitely wished I could have finished that one, but we've got a pretty good closer coming in behind me."
The Reds, now 60-49, finished their 11-game West Coast road trip with a 5-6 record, after it started out at 4-1. The win also put them over .500 to end the month of July at 14-13.
"Very relieved," Baker said of the losing streak's end. "We left some runners out there early and again had a couple of baserunning miscues. We battled and battled, and Homer gave us all we needed."