After Brandon Beachy gave up only two runs in seven innings to outlast Phillies starter Cole Hamels, the Phillies broke a 2-2 tie with two runs against left-hander Jonny Venters (2-1).
Mayberry, in the game as a pinch-hitter, doubled to right with one out, moved to third on Jimmy Rollins' single and scored on Venters' wild pitch to Placido Polanco. Shane Victorino added an infield hit and Pence singled to right, driving in Rollins for a 4-2 lead.
Antonio Bastardo (1-1) pitched a perfect seventh. Jonathan Papelbon earned his ninth save by retiring the Braves in order in the ninth.
Venters gave up four hits and two runs, the first he has allowed in 10 games, while recording two outs.
The Phillies (12-12), the five-time defending NL East champions, returned to .500 after finishing April at 11-12 for their first losing record in a full month since going 11-15 in June 2009.
The Phillies took a 2-0 lead in the fourth. Polanco singled and moved to third on a double by Pence with two outs. Ty Wigginton followed with a single which skipped past left fielder Martin Prado. Pence ran past third base before Prado's error, so Wigginton, who advanced to third, was credited with two RBIs.
After Brian McCann's homer in the fourth, the Braves pulled even with one run off Hamels in the sixth. Singles by Freddie Freeman and Matt Diaz and a walk to McCann loaded the bases. Freeman scored from third on Juan Francisco's flyball to left field.
Hamels gave up two runs on six hits and two walks in six innings.
Beachy gave up five hits and two runs in seven innings.
The Braves helped Beachy with two strong defensive plays in the seventh. Tyler Pastornicky made a diving grab of Pence's line drive to open the inning. Matt Diaz, running at full speed, then caught Wigginton's liner at the right-field wall.
NOTES: The Phillies placed RHP David Herndon on the 15-day disabled list with right elbow inflammation and called up RHP Brian Sanches from Triple A Lehigh Valley. Herndon was having tests on the elbow in Philadelphia. ... Braves RF Jason Heyward was held out for the second straight day with soreness around his right oblique muscle, and he said he may not play on Wednesday. 3B Chipper Jones, also held out, has started only 12 of 24 games. ... Phillies RHP Roy Halladay, who is 4-1 in his career against Atlanta, will start in Wednesday night's game against Braves RHP Tommy Hanson.