PHILADELPHIA -- Freddy Galvis was struggling.
Mired in a potentially confidence-wavering 0-for-10 offensive stretch, Galvis produced the first four-hit game of his Major League career, culminating in a walkoff home run to lead off the bottom of the ninth in the Phillies' 6-5 victory over the Braves Saturday night at Citizens Bank Park.
"I was trying to hit it up the middle," said Galvis of the 1-0 offering from Freddy Garcia that he pulled and deposited into the right-field seats. "That pitch was a hanger. I made a good swing. Thank God that was a homer."
Relegated to a part-time role earlier this summer, the Phillies sent Galvis down to Triple-A Lehigh Valley to have him work on hitting more line drives and using the entire field. He's back with a different approach and feeling better at the plate.
Galvis singled in the second, fifth and seven innings before his second walkoff shot of the season. The first was off of the Reds' Aroldis Chapman on May 19.
"I think the hits leading up to the home-run swing all worked," said Phillies manager Ryne Sandberg. "In the ninth, I think that he just reacted to a pitch and got a hold of it, resulting in the home run without a big home-run swing."
The NL-East leading Braves had tied the game at 5 in the top of the ninth on a no-doubt-about-it two-run blast by Andrelton Simmons off of Phillies closer Jonathan Papelbon with two out on a 2-2 fastball.
"We battled back and tied it, but Freddy Galvis got us," said Atlanta manager Fredi Gonzalez. "We had opportunities."
The win was the second in a row by the Phillies, who are headed for their first losing season since 2002, over the playoff-bound Braves.
The Phillies, despite a roster heavy on players that spent at least part of the season in Triple-A Lehigh Valley, are doing more than just playing out the string.
Galvis, new center fielder Cesar Hernandez (3 for 4), relievers Justin DeFratus and Jake Diekman (combined four strikeouts, one hit allowed in two innings) and others are playing well at this level.
"I think it means a lot," Sandberg said. "There's games to be played, there's a game to be won. The quality of baseball against a team like the Braves shows the resilience of the guys."
The Phillies outhit the Braves 15-7, but a two-run single by Atlanta first baseman Freddie Freeman and Simmons' shot appeared like they might be enough to force extra innings.
"At least we battled back into the game," Simmons said. "If we played any more innings, we might have won it."
The Braves are only 34-36 on the road but built their double-digit divisional lead via an MLB-best 51-20 home record.
"We'll keep plugging away," Gonzalez said.
Catcher Carlos Ruiz had three RBIs, including a two-run single, out of the No. 4 hole to stake the Phillies to a lead they maintained for much of the evening.
"He's playing really well -- like the Chooch that everybody knows," Sandberg said.
Philadelphia starter Kyle Kendrick tied a career high with eight strikeouts in six innings and would have been credited with the win had Papelbon not blown the save.
Atlanta's Alex Wood was in and out of trouble during his 4 2/3 innings, allowing nine hits, four runs (all earned) and three walks.
"It's very frustrating. I'm trying to help my team clinch a pennant. I'm not doing exactly what I want to do when I go out there."
NOTES: Phillies manager Ryne Sandberg said injured OF Ben Revere will be going to the team's minor league complex in Clearwater, Fla., to continue rehabilitating his broken foot. The team expects Revere to play some games this month in Florida, with the idea of getting him mentally ready to play at the start of the 2014 campaign. ... Braves manager Fredi Gonzalez has guided Atlanta to an NL-best 268-196 record since he arrived in 2011. ... Atlanta has been as many as 32 games above .500 this year, marking its highest total since finishing 101-61 (40 over) in 2003.