Spieth, once the No. 1 player in the world, hadn't won a PGA Tour event since the 2017 British Open, a span of 1,351 days.
"There's peaks and valleys in this sport, but I never expected to go this long," Spieth said. "Back then, in between wins, maybe I took things more for granted than I should have. It's very difficult to win out here and I'll certainly enjoy this as much as I have any other."
Spieth had to fend off a spirited comeback attempt from Hoffman to earn the win. Hoffman went from a 3-shot deficit with six holes left to a single shot back.
The 27-year-old Spieth sealed the victory with a birdie on hole No. 17. Hoffman found a bunker off the tee on the par-4 17th and settled for par as Spieth climbed two shots ahead. They both made par on the final hole.
"This is a monumental win for me. It's been a long road," Spieth said. "There were a lot of times that I didn't know I would be here."
With the win, Spieth, who finished at 18-under 270, jumped to No. 38 in the world. He is back in the top 50 for the first time in more than a year.
Matt Wallace ended in third at 14-under 274. Lucas Glover came in fourth at 12-under par, while Anirban Lahiri finished fifth at 10-under 278.