Acuna also had a single, double and three RBIs as the reigning three-time NL East champion Braves evened their record at 29-29.
''That was just a hard-fought win. A lot of good things happened,'' manager Brian Snitker said.
J.T. Realmuto and Bryce Harper hit solo homers for Philadelphia. Aaron Nola allowed four runs and seven hits, striking out seven in five innings.
Atlanta lefty Drew Smyly lasted 4 1/3 innings, yielding three runs - two earned - and five hits.
The Braves trailed 5-4 entering the eighth before Riley blasted a tying homer off Connor Brogdon (4-2). Dansby Swanson walked and Abraham Almonte followed with a single, chasing Brogdon. Contreras lined an RBI single off Sam Coonrod for a 6-5 lead. Another run scored when Guillermo Heredia hit a bouncer to the mound that Coonrod threw into center field.
Acuna's broken-bat single to left knocked in two more for a 9-5 lead.
Acuna slammed his 18th homer 460 feet into the second deck in left field for a 2-0 lead in the third.
''That might be the best one I've ever seen, but it only counted for one run,'' Snitker said.
After making a twisting catch to save a run and rob Ronald Torreyes of extra bases to end the fourth, Acuna hit a double in the fifth and scored on Freddie Freeman's single that put Atlanta up 4-2.
Sean Newcomb (2-0) tossed a scoreless seventh for the win.
''It's a long season. We just have to keep grinding, winning games and doing our thing,'' Acuna said.
Realmuto's opposite-field drive to right off Shane Greene in the sixth tied it at 4. Pinch-hitter Brad Miller's RBI single off Tyler Matzek gave the Phillies a 5-4 lead.
Contreras connected in the fourth, sending an opposite-field shot out to right-center for a 3-1 lead.
Harper lined a 3-0 pitch out to right in the bottom half to make it 3-2, ending a streak of 47 at-bats without a homer. All eight of Harper's homers this season have been solo shots.
''We did a good job of fighting back and doing the little things well,'' Phillies manager Joe Girardi said. ''We can't get out of the eighth and it's frustrating.''
The Phillies recognized Joe West with a pregame video tribute for recently breaking the record for most games umpired. The Phanatic gave West an oversized cowboy hat.
The Phillies promoted utilityman Luke Williams from Triple-A Lehigh Valley earlier in the day and he reached on a bunt single in his first major league at-bat. The right-handed-hitting Williams adds versatility on the bench as he has played every position except catcher and pitcher. Williams won't be able to play for Team USA in the Olympics because of his promotion to the majors.
Braves: RHP Mike Soroka (torn right Achilles tendon) is making progress, according to Snitker. It remains uncertain whether Snitker can return this season.
Phillies: RHP Brandon Kintzler (neck) was placed on the 10-day injured list. SS Didi Gregorius (elbow) might be ready for a rehab stint this weekend.
LHP Tucker Davidson (0-0, 2.31 ERA) starts for the Braves and RHP Zach Eflin (2-5, 4.10) goes for the Phillies on Tuesday night.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.