The Braves opened a nine-game road trip with a clutch win that kept them within three games of division-leading Philadelphia in the National League East.
Atlanta faced a 3-0 deficit heading into the fourth but then took advantage of a critical error that made all six runs in the big inning unearned.
Jonathon Niese (9-9) gave up a leadoff single to Derrek Lee but then recorded a strikeout and got Matt Diaz to hit a grounder to third baseman David Wright. The throw to first by Wright was wild and runners wound up on first and third.
After Alex Gonzales popped up to the catcher for what should have been the final out of the inning, the Braves went to work against Niese. Melky Cabrera singled in a run, Tommy Hanson drew a walk to load the bases and Omar Infante drove in two runs with a double to tie the game.
Heyward followed with his 18th homer of the season for a 6-3 lead.
The victory went to Tommy Hanson (10-11), who has won only two of his last 14 starts. He allowed four runs on five hits in six innings.
Billy Wagner worked a perfect ninth for his 34th save.