Brian McCann and Chris Johnson hit back-to-back singles off Gregg to break the 5-5 tie in the ninth after the Cubs came back from a four-run deficit.
The Braves’ victory puts them one win away from clinching the National League East division title. Any combination of a Braves win or a Washington Nationals loss will give the Braves the division title.
Chris Johnson hit a solo home run to left field in the second for a 1-0 Braves lead.
The Braves took a 4-0 lead in the third inning. Freddie Freeman hit a three-run home run – his 22nd of the season – to straightaway center field after Cubs starter Scott Baker (0-0, 3.60 ERA) walked two batters.
Cubs first baseman Anthony Rizzo hit a two out RBI single in the third off Braves starter Paul Maholm (10-10, 4.38 ERA) and Maholm answered with his own two out RBI double in the fourth to put the Braves up 5-1.
Starlin Castro led off the fifth with his 10th home run of the season.
The Cubs pulled to 5-4 in the sixth as they chased Maholm. Donnie Murphy hit his 11th home run before Junior Lake doubled a sharp line drive to left field. Pinch-hitter Luis Valbuena added a RBI single.
Dioner Navarro hit a two out solo home run in the seventh to tie it 5-5.
Maholm gave up eight hits and four runs, struck two in 5 1/3 innings. Baker went four innings, allowed four hits and five earned runs, struck out one and walked three.