Headley, who came off the 15-day disabled list before the game, connected on a 2-2 fastball from Carlos Marmol (0-3) to cap a four-run sixth inning and give the Padres a 6-2 lead.
"It's huge to have a couple of wins where you're not stressed about it," Smith said. "You get some runs early, the pitchers are doing well. Just mentally you can kind of cruise to the end. It's huge for your psyche, just for your mental state."
San Diego, which came in averaging a major league-low 2.8 runs per game, was coming off a 10-1 win over Miami on Friday, its highest scoring output since Sept. 25.
Smith hit a solo homer, a two-run double and an RBI triple for the Padres, who matched Friday night's total of 13 hits.
Another thing that was good for the Padres' mental state was the return of Headley, back after recovering from a strained right calf.
"It's awesome," Headley said. "It really felt like I was swinging at the pitches that I wanted to early in the game. I put together a bunch of good at-bats to lead up to it [homer]. It felt great."
The 19 combined runs were the most San Diego scored in consecutive games since Sept. 5-6, 2012.
"Those two guys hitting right there in the middle of the lineup was production at its finest," Padres manager Bud Black said.
Smith has been one of the few Padres who has consistently hit this season. Since May 3, the lefty is batting .577 (15-for-26) with six doubles, three triples, a home run and six RBIs.
"Guys are starting to settle down a little bit and have some good at-bats," Headley said. "When you do that as a club, it puts pressure on the pitcher."
Marmol intentionally walked Smith, who had an RBI triple in the first and hit a solo homer in the third. Jedd Gyorko followed with an RBI single.
Headley was hitless in two at-bats with a walk when he pulled Marmol's 93 mph fastball down the right-field line. The ball went just inside the foul pole for his third homer.
"I feel like my swing is in a better place than where it was when I went on the DL," Headley said.
"That's Chase," Smith said. "He's going to do things for us, as long as he is healthy and in the lineup. It definitely makes our lineup deeper."
Marlins manager Mike Redmond said the club was going to designate Marmol for assignment.
"It's been a struggle for him," Redmond said. "We've tried to keep getting him in there in different situations and it just hasn't worked."
Marmol has an 8.10 ERA, having allowed 12 runs on 16 hits over 13⅓ innings.
"It didn't work out," Marmol said. "You got to get people out here. It's tough. There's not much to say. I tried my best on the mound and it didn't work out."
Casey McGehee hit a two-run homer in the first inning for the Marlins, whose road record dropped to 3-12, worst in the majors.
Eric Stults (2-3) allowed two runs on six hits over six innings.
The switch-hitting Headley came into the game batting just .186 with two home runs and seven RBIs in 70 at-bats. He was one of four San Diego regulars hitting below .200.
The Padres have scored just 10 runs while Stults was in the game in his eight starts. . The Marlins came into the game with an 8-2 record against left-handed starters, tops in the majors. . Padres RHP Hector Ambriz, designated for assignment on Thursday, cleared waivers and was outrighted to Triple-A El Paso on Saturday. . Marlins RHP Henderson Alvarez (2-2, 2.62 ERA) faces Padres LHP Robbie Erlin (1-4, 4.95) in Sunday's finale.
Copyright by STATS LLC and The Associated Press
SAN DIEGO, CA - MAY 10: Eric Stults #53 of the San Diego Padres pitches during the first inning of a baseball...