Latos allowed one run in a season-high eight innings. The 23-year-old ace of the staff gave up six hits, struck out seven and did not walk a batter in his best performance of a troubled season.
"I thought he looked hands down better than he's looked all year," Headley said. "He finally had his weapons available and was throwing strikes. I think every staff you need to have one guy who just has dominating stuff and it's nice to see that from him."
Latos (2-6) has struggled since losing his last five starts last season and 11 of 12 decisions overall. But against the Cardinals, Latos looked more like the pitcher who set a major league record last season with 15 straight starts of allowing two runs or less.
"That's how I visualize him throwing the ball from the first pitch of the game until the last," San Diego manager Bud Black said. "He threw more four-seam fastballs. He turned the ball loose with conviction. I think it makes all his pitches better when he pitches with the mindset that he's a fastball pitcher."
Latos won for the first time in seven decisions at home.
"It was me making the adjustments I needed to make," Latos said. "I'm a rear-back-and-throw-it and let-it-go kind of a guy. I have to go out there and get back to me."
San Diego ended an eight-game homestand with a 2-6 mark. The Padres entered the game having been outscored (25-8) and outhit (53-22) in the first seven games.
"It's big for us because of the way we won," said closer Heath Bell, who pitched a perfect ninth for his 10th save in 11 chances. "It's a big momentum changer for us. I think it gives us a lot of confidence and gets a lot of frustration off our shoulders."
The Cardinals had won four in a row. San Diego, which still has the NL's worst home record at 9-20, scored more than two runs for the first time in nine games.
It was 1-all in the Padres eighth when Jason Bartlett reached on a two-out infield single, his third hit of the game. Headley followed with his tiebreaking double, continued to third on shortstop Tyler Greene's error and scored on an infield single by Ryan Ludwick off Chris Carpenter (1-5).
"He made some good pitches up to that point," Headley said. "I was just kind of fighting him off at that point. Then he tried to throw a sinker away but I was able to reach out there and fight it off. I got enough of the barrel on the ball to get it inside the line."
Carpenter gave up eight hits in a complete game, the 30th of his career. He struck out six and did not walk a batter.
"Headley put a good at-bat on me," said Carpenter. "I made a good pitch that wasn't even on the plate and he (hits) it just out of the reach of (third baseman Daniel) Descalso."
Although he has just one win in 11 starts, Carpenter sees improvement and room for optimism.
"I felt good," he said. "I got ahead in the count and had command of my fastball. I was getting quick outs. It's been weird because I feel like I've been throwing the ball pretty well."
San Diego's Brad Hawpe homered for the second straight game, a leadoff shot in the second that made it 1-1.
San Diego 2B Orlando Hudson left the game in the seventh with a left groin strain after an infield single. ... Cardinals LF Matt Holliday (strained left quadriceps), the NL's leading hitter at .349, did not start for the third straight game. ... In two career starts against St. Louis, Latos had allowed 15 runs in 5 1/3 innings. ... The Cardinals are 2-9 in Carpenter's starts. ... Padres INF Blake Tekotte made his major league debut in the eighth inning and flied out as a pinch-hitter.