Updated

Freddy Galvis hit a solo home run in the bottom of the ninth inning to lift the Philadelphia Phillies to a 6-5 win over the Atlanta Braves and take the first two of this three-game set from Citizens Bank Park.

After Andrelton Simmons tied the score in the top of the ninth with a two-run homer off Jonathan Papelbon (5-1), Galvis capped a 4-for-5 effort with his eighth career home run, a blast off Atlanta reliever Freddy Garcia (0-1).

"My approach was to stay to the middle, to be on base," Galvis said. "That pitch was a hanger and I made a good swing. Thank God I hit a homer. It feels really good to hit a walkoff homer."

Carlos Ruiz had three RBI while Cesar Hernandez and Kevin Frandsen each picked up three hits as Philadelphia won its second straight over Atlanta after dropping two in a row.

Kyle Kendrick spun six innings of three-run ball while striking out eight for the Phillies, who are 10-2 in their last 12 one-run games.

Alex Wood started for Atlanta, but failed to get out of the fifth inning after yielding four runs on nine hits and three walks. Freddie Freeman went 2-for-4 with a pair of RBI.

Kendrick ran into trouble in the third inning when he hit Dan Uggla to start the frame. Simmons singled and Justin Upton walked to load the bags before Freeman plated a pair with his single to center.

However, the Phils got those runs back in the home half.

With runners on second and third and two outs, Ruiz knotted the score with a single to left.

Ruiz put Philadelphia on top two innings later when he and Chase Utley cranked consecutive doubles, the second of which plated the Phillies' second baseman. Galvis made it 4-2 with an RBI single later in the frame, and Wood's night was done.

Luis Ayala stranded the two inherited runners when he struck out John Mayberry Jr. in three pitches to end the inning.

Atlanta cut its deficit to 4-3 when Chris Johnson doubled home a run in the sixth inning. Freeman and Evan Gattis reached to start the frame but Brian McCann grounded into a double play, leaving just one baserunner for Johnson.

Hernandez led off the bottom of the eighth with a double to right center. Frandsen scored him one batter later with a single to center, giving the Phillies a 5-3 advantage.

"We battled back and tied it but Freddy Galvis got us," Braves manager Fredi Gonzalez said. "We had opportunities but haven't had that bloop single or ground ball through the middle, but we'll keep plugging away."

Game Notes

Simmons had three hits and scored twice ... Braves center fielder B.J. Upton went 0-for-4 with four strikeouts ... The Phillies outhit Atlanta, 15-7 ... Philadelphia left 12 men on base, but went 4-for-14 with runners in scoring position.