Soaring temperatures in New York helped the ball carry and the Braves and Yankees combined for nine home runs.
Heyward's two-run homer in the eighth put Atlanta up 9-5 and stunted a New York comeback. That allowed Tommy Hanson (8-4) to escape with the win. Hanson gave up four solo home runs in five innings.
New York starter Phil Hughes (7-6) also allowed four home runs but six runs over 4 1/3 innings in taking the loss.
Atlanta scored three times in the first and stretched the lead to 6-1 in the fifth before New York started to come back.
But Martin Prado led off the eighth with a double and took third on an out. After an intentional walk, the Yankees misplayed a potential double play ball, allowing Prado to score and Heyward to bat and he responded with his second homer of the day.