The Pirates trailed 4-3 going into the final frame but tied it on Kevin Newman's run-scoring double with one out. The Reds then intentionally walked Bryan Reynolds to put runners on first and second and brought in left-handed reliever Ross Detwiler to replace Joel Kuhnel (2-2).
Detwiler hit Ben Gamel to load the bases and Chavis lined a single into short left field.
''I love being in that kind of clutch moment,'' Chavis said. ''I've been in those situations before, and I love the perception of the pressure being on the pitcher instead of the hitter. It came out good tonight. It was exciting.''
Gamel had three hits. Newman added two hits and two RBIs, and Greg Allen and Bligh Madris also had two hits. Wil Crowe (5-7) got the win.
''Those back-to-back wins are important to kind of get the ball rolling again for us,'' Chavis said of his team's streak after a six-game losing streak. ''Once you get in that groove, good things can happen.''
The Reds took a 3-0 lead behind home runs from Nick Senzel and TJ Friedl but wound up losing for the eighth time in their last 10 games.
''It's a tough (loss), for sure,'' Reds manager David Bell said.
The Pirates came back from the 3-0 deficit when Kevin Newman scored on a wild pitch in the sixth. An inning later, he hit a sacrifice fly before Gamel tied it with a single. Cincinnati then pulled ahead 4-3 on Kyle Farmer's RBI single in the eighth.
''The last three innings, we had really good at-bats and we got a lot of contributions from a lot of people,'' Pirates manager Derek Shelton said.
Reds rookie Graham Ashcraft struck out eight in 6 2/3 innings while allowing three runs on nine hits and one walk. The Reds have blown a save in four of Ashcraft's last eight starts.
''He was really efficient,'' Bell said. ''I thought for a while he might pitch a complete game.''
Pittsburgh's Bryse Wilson gave up three runs and five hits in seven innings while striking out four and walking none.
Pirates general manager Ben Cherington said prior to the game that Shelton will return for a fourth season in 2023.
''I'm so happy with the level of effort he's given to help us get better,'' Cherington said. ''I'm looking forward to this group benefitting from the fruits of his labor.''
Reds: 1B Joey Votto (torn left rotator cuff) was placed on the 60-day injured list after undergoing season-ending surgery on his shoulder Friday. The six-time All-Star is expected to be ready for the start of the next season, which will mark the final year of his 10-year, $225-million contract. . 1B/3B Mike Moustakas (strained left calf) was activated from the 10-day IL after being out since Aug. 9. . Senzel (strained right hamstring) returned to the lineup after missing three games. . INF Donovan Solano was expected to be reinstated from the paternity list but tested positive for COVID-19 and was transferred to the restricted list.
Pirates: RHP Mitch Keller (right shoulder fatigue) had his next scheduled start pushed back three days to next Wednesday against Atlanta. Keller left his start against Boston on Tuesday after two innings. RHP Zach Thompson will start Sunday against the Reds in Keller's place.
Reds: RHP Justin Dunn (0-1, 8.64) will be making his third start Saturday night since being called up from Triple-A Louisville.
Pirates: RHP Tyler Beede (1-2, 3.72) is 0-1 with a 6.75 ERA in three starts since moving from the bullpen to the rotation.
More AP MLB: https://apnews.com/hub/mlb and https://twitter.com/AP-Sports
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.