The 24-year-old from Oban looked to be heading for the exit door when he stood one down against American Adam Long in the final round-robin matches at Austin Country Club.
But, after hitting his drive at the 375-yard par 4 to just over two feet as Johnson and Kevin Na were still on the green in the match ahead, MacIntyre was eventually conceded an eagle-2.
Minutes earlier, Na had made a birdie at the same home to beat Johnson, meaning that MacIntyre went through with two points from three games on his debut in the $10,5 million event.
“I hit probably one of the best and one of the luckiest golf shots I've hit in my life,” said MacIntyre after setting up a clash with Dundee-based Frenchman Victor Perez.
“I had a bit of bad luck here and there. You've just got to keep fighting until the end, and it just shows anything can happen in this game.”
For the third day running, MacIntyre lost the opening hole, a par proving good enough for Long on this occasion after his opponent missed the fairway on the right with his tee shot then couldn’t convert a four-footer.
There was no immediate bounce back from the Scot this time, as had been the case against both Na and Johnson, but parity was restored at the third where MacIntyre set up a birdie with a fine blow from 146 yards to eight feet.
Long, who took Johnson the distance in an opening-day defeat before resurrecting his hopes with victory over Na, then looked to have taken the match by the scuff of the neck as he won the fifth, eighth and ninth to be three up at the turn.
The American, in fairness, was out in three-under, but he soon discovered that his opponent is made of stern stuff, especially when he has his back against the wall.
MacIntyre won the 10th with a two-putt par from long range before producing a brilliant up and down from 36 yards for a hole-winning birdie at par-5 12th then converted a six-footer for a birdie at the next to square matters.
Long got his nose back in front with a birdie from close range at the par-4 15th and was the man set to progress until Na’s closing birdie and MacIntyre’s sensational tee shot shortly afterwards.
Asked what it meant to top a group that included the game’s top-ranked player, the left-hander said: “It's massive for my confidence.
“I was three down through nine, and Mike (Thomson, his caddie) gave me a shake on the 10th tee, saying, ‘come on, we've got to keep fighting here’.
“That's something that I normally always have inside me, but my head was down through nine and I didn't know where to go. But we just kept giving ourselves chances, and it happened to turn around at the right moment.”
Sergio Garcia made a hole-in-one in a play-off to beat Lee Westwood as the Spaniard also progressed along with Tommy Fleetwood, who saved par at the last from a hazard to beat Bryson DeChambeau.