Josh Lindblom (3-3) pitched a scoreless ninth, allowing one walk and striking out one.
Jonathan Papelbon earned his 31st save in 34 chances by striking out Dan Uggla, getting Paul Janish to fly out and striking out Eric Hinske in the 10th.
Martinez (5-4) allowed three hits, three runs, one walk and struck out two.
The Braves, who have lost two straight and three of four, dropped 6½ games behind first-place Washington in the NL East.
Philadelphia has won back-to-back games and six of eight. The Phillies are 18 games back in the NL East, but they finished August with a 17-12 record.
Kevin Frandsen led off the 10th with a single, moved to second on Martinez’s balk and advanced to third on Chase Utley’s groundout. After Ryan Howard was intentionally walked, Martinez struck out Juan Pierre before Mayberry’s 13th homer landed in the seats in left field.
Kratz’s homer made it 5-all in the ninth. The blown save was Kimbrel’s second since Aug. 3. Though Kimbrel has converted 32 of 35 chances this season, his last blown save came July 20 on a homer by Washington’s Danny Espinosa.
Uggla homered off Jeremy Horst to break a 4-all tie in the sixth.
Martin Prado and Freddie Freeman hit two-run homers in the fifth.
Howard, whose 10th homer made it 1-0 in the second, cut Atlanta’s lead to 4-3 in the sixth with a two-run single that chased Atlanta starter Mike Minor. Ty Wigginton’s sacrifice fly off Chad Durbin made it 4-all.
Hallaway gave up seven hits, four runs, four walks and struck out three in 4 2-3 innings.
Roy Halladay is 0-3 with a 6.75 ERA in four starts at Turner Field this year. The two-time Cy Young Award winner had gone 4-1 with a 2.75 ERA in his first five August starts.
The Phillies improved to 2-8 against Atlanta this year.
Minor led off the fifth with a single and scored with one out on Prado’s eighth homer. After Jason Heyward’s popup, Hallaway walked Chipper Jones before Freeman launched his 19th homer to make it 4-1.
In the sixth, Minor loaded the bases on singles by Jimmy Rollins, Frandsen and Utley. Howard singled softly to center to score Rollins and Frandsen and cut the lead to 4-3.
Howard has 40 homers and 115 RBIs in 129 career games against Atlanta.
Minor allowed seven hits and four runs with one walk and three strikeouts in four-plus innings.
On the last play of the fourth, the 40-year-old Jones was trying to score from second on Janish’s single to center, but he was tagged out at the plate by Kratz. Though Jones lowered his shoulder and knocked Kratz on his back, Kratz held onto the ball to preserve Halladay’s 1-0 lead.