The 39-year-old Californian recorded two birdies early on the back nine to break clear of a congested leaderboard, and then held steady before sinking his winning birdie putt from nine feet at the last to post a 12-under total of 276.
Compatriot Patrick Reed, who played with Hoffman in the final round, had to settle for second place as he also signed off with a 69, narrowly missing eight-foot birdie putts on 16 and 17 before finishing up with a birdie at the par-five 18th.
Barnes, who carded a five-bogey 74, finished three shots off the pace in a tie for fourth.
“It’s won,” an emotional Hoffman told CBS Sports, his voice cracking after he had got up and down from a greenside bunker to birdie the last.
“This month was hard, being in contention every Sunday and not closing the door. It’s not me. It was nice to make that putt (on 18), that’s for sure. I’m happy.”
Hoffman triumphed for the first time on the PGA Tour since landing the 2015 OHL Classic at Mayakoba, and he did so by posting his first sub-73 score in a final round in his last seven tournaments.
Prior to this week, his final-round stroke average of 74.75 was 5.02 shots worse than his first round average, and more than three shots worse than his mean in the second or third rounds.
Ten players were bunched within four shots of the lead heading into the final round and overnight pacesetter Barnes fell back into a tie at the top with Brendan Steele when he bogeyed the par-four first after bunkering his second shot.
As Barnes’ title bid evaporated, Hoffman narrowly missed a 10-foot birdie opportunity on 15 that would have put him two strokes clear.
He then held his nerve with clutch pars at 16 and 17 before finishing in birdie style by ramming his winning putt home.
(Reporting by Mark Lamport-Stokes in Los Angeles; Editing by Andrew Both)