Foltynewicz pitched eight shutout innings as the Braves recorded their 19th division championship, tying them with the New York Yankees for the most in Major League Baseball since the divisional era started in 1969.
The Yankees won their 19th title on Thursday.
The victory also ensures the Braves of home-field advantage for the NL Division Series.
Foltynewicz allowed three hits and one walk as he improved to 8-5 on the season. He finished with seven strikeouts.
Foltynewicz won his seventh straight decision, and over his last four starts he is 4-0 with a 0.69 earned run average.
Josh Tomlin came on in relief and pitched a scoreless ninth inning to seal the win.
The Braves offense was led by Ronald Acuna who was two-for-two at the plate with a double, a home run, two walks, three runs and two RBIs.
Acuna has scored 126 runs, moving him within five of the modern-era franchise record of 131 set by Dale Murphy in 1983.
San Francisco rookie pitcher Tyler Beede took the loss.