Johnson, in his return from a freak back injury that knocked the world's No. 1 player out of the Masters, went from making the cut on the number to a 67-67 weekend at Eagle Point and appeared headed for a playoff with Harman and Pat Perez.
Harman won it with a birdie-birdie finish, none bigger than the par-5 18th.
After going so long on his second shot that he needed relief from behind a corporate tent, Harman hit a heavy chip that barely got onto the green. From just under 30 feet away, the putt dropped into the center of the cup and set off a wild celebration, with Harman repeatedly shaking his fists and leaping to share a hard hug with his caddie, Scott Tway.
Harman closed with a 4-under 68 for his second PGA Tour victory.
"It's surreal," Harman said. "I three-putted that 15th hole, knew it was going to be tough to birdie those last couple. But I stuck to my game plan and just did it. Did the best I could."
And it was just enough.
Johnson was playing for the first time in six weeks because of his slip down the stairs the day before the Masters that led to him pulling out. A quick start allowed him to lurk behind the leaders all day, and he holed a 15-foot birdie putt on the 18th that gave him a share of the lead.
Then, he was alone in the lead when others started to stumble -- Perez with a double-bogey on No. 14, Harman with the three-putt bogey on the 15th, and Patrick Reed, the 54-hole leader who made four bogeys in a six-hole stretch on the back nine.
Perez bounced back strong with birdies on the 16th and smart play on the 18th, taking on the water that runs along the right side of the hole and laying up to trust his short game. He hit a pitch up the slope to 4 feet for birdie and a 68.
Perez headed upstairs to the clubhouse to hang out with Johnson, and when Harman left himself a long birdie chance on the 18th, they were gearing up for a playoff.
And then they weren't.
Jon Rahm of Spain, one of five players who had at least a share of the lead on the back nine, was the last player with a chance if he were to make eagle on the final hole, as he did when he won at Torrey Pines in January. But his approach sailed over the green, and his chip never had a chance.
Rahm closed with a par for a 71 to finish alone in fourth.
Reed shot 40 on the back nine for a 75 and fell out of the top 10. He played in the final group with Alex Noren of Sweden, who closed with a 77.
Harman's only other victory was the John Deere Classic in 2014 that sent him to the British Open. Besides other perks of winning, this victory gets him back to the Masters, which he has played only one time.
Johnson watched someone else leave with the trophy for the first time since Feb. 12, when he finished third behind Jordan Spieth at the AT&T Pebble Beach Pro-Am. Johnson ran off three straight victories against the strongest fields of the year to date, including a pair of World Golf Championships.
And then came the mishap at the Masters, when he suffered a deep bruise on his lower back from the tumble down the stairs while wearing only socks. This is the first time he played in six weeks, and while there were signs of rust, he looked like the same old Johnson over the weekend as he made up ground.
"I didn't have a lot of time off, so I didn't really know what to expect this week because I didn't really get to practice leading into this tournament, either," Johnson said. "Not much has changed. The first couple days I didn't play that great, but really played nicely on Saturday and Sunday, and so I'm happy with where the game is going into next week."
Johnson had three birdies in six holes to lurk behind the leaders the rest of the day, and he kept pace with birdies on the 12th and 13th. His second shot on the par-5 12th hit the front of the green and was rolling back toward the water, stopping 8 inches away. He got up-and-down for birdie, the kind of break winners need.
Harman had other ideas.