Gauff, who reached the Wuhan semi-finals last year, trailed 0-3 in the second set on Sunday but clawed her way back, reducing the deficit to 3-5 before winning four straight games to seal victory in straight sets.
The 21-year-old secured her 11th career WTA singles title, adding to her WTA 1000 triumphs in Cincinnati (2023) and Beijing (2024), and reached her third final at this level in 2025 after runner-up finishes in Madrid and Rome.
World No.3 Gauff, the 2023 US Open champion, becomes the first woman in a decade to win nine consecutive hard-court finals, a feat last achieved by Serena Williams, who won 12 between the 2013 US Open and 2015 Cincinnati.
Pegula and Gauff, former doubles partners who won titles together in Miami and Doha in 2023, were playing against each other in a final for the first time in their career.
"When I came on tour, you were one of the first people to be nice to me and welcome me with open arms. And that really goes a long way and still goes a long way," Gauff told Pegula during the trophy presentation.
"So I appreciate you. And it's great to finally play in a final against you."
Pegula, who beat world No.1 and defending champion Aryna Sabalenka in Saturday's semi-final to end her 20-match unbeaten run in Wuhan, has now been embroiled in 27 three-set contests this year.
The 31-year-old's last eight matches have all gone the distance, and she has won seven of them.
"You've been playing a lot of three-setters -- you're a three-set queen," Gauff told her.
"I'd like to congratulate you on an incredible tournament. I was determined not to let you get there today because I felt the odds would be in your favour in a third set."