Johnson built a 5-up lead after eight holes and held on, though only barely, after a late Rahm rally that cut the lead to 1-up after 16 holes.
“Today was a really tough day. I’m proud of the way I played, the way I stayed in there, even though he (Rahm) made some birdies on the back nine,” Johnson told NBC television after sinking his winning putt from inside three feet at the final hole.
Johnson earlier barely survived his semi-final against 54th seed Hideto Tanihara, winning 1-up after the Japanese player missed a good chance to win the 18th hole.
Rahm beat American 42nd seed Bill Haas 3&2 in the other semi.
It was Johnson’s third consecutive victory, after he won the event formerly known as the Los Angeles Open and then the WGC-Mexico Championship.
Johnson’s five WGC titles puts him second behind Tiger Woods, who has 18.
Johnson said the key to victory had been avoiding mistakes.
“I didn’t give him any holes, except for 10 (where) I three-putted. It was tough out there. The greens got really fast, the wind was affecting all the putts. Jon played really well. I just didn’t really give him anything.”
In a final that matched two of the game’s longest hitters, Johnson looked set to cruise to victory thanks to his big early lead, but it got interesting near the end.
Rahm, 3-down with four holes left, came to life, winning the par-four 15th with a birdie before taking the par-five 16th with another birdie, sinking a 30-footer after an astonishing second shot from the rough that he somehow threaded through an oak tree.
Rahm then drove through the green at the par-four 18th, ending up over the back, from where, perhaps distracted by a loud sudden banging noise just as he started his swing, he misjudged his 80-foot chip shot and could only par, allowing Johnson to escape with the win.
In the match for third place, Haas beat Tanihara 2&1, though the loser at least enjoyed a hole-in-one at the par-three seventh.
(Reporting by Andrew Both in Cary, North Carolina, editing by Gene Cherry)