The New Zealander entered the day three shots off the lead and when he made a triple-bogey on the difficult third, he could have been forgiven for thinking that his chance had gone.
But he picked up two birdies on the front nine to turn in 36 and then came home in 31, birdieing the par-five 18th from six feet after laying up, to finish at 18 under, one clear of home favourites Tyrrell Hatton and Aaron Rai.
World Number Three Jon Rahm was 16 under after a 68, one ahead of Ryder Cup team-mate Viktor Hovland and two clear of another Ryder Cup player in Tommy Fleetwood.
World Number Two Rory McIlroy made a charge through the field with a closing 65 and he finished at 13 under alongside Australian Adam Scott and England's Callum Shinkwin.
Fox enjoyed a stellar start to his Rolex Series career, claiming three top tens in consecutive weeks in his rookie season in 2017 before adding another three in 2018, including a play-off loss at the Irish Open.
He had not had another Rolex Series top ten since, or a top ten at this event, coming into this week but he had added three DP World Tour wins and claimed last season's Seve Ballesteros Award after finishing second on the Race to Dubai Rankings in Partnership with Rolex.
A tie for third at last week's Horizon Irish Open represented his best finish of 2023 so far and he now enters the history books as the first Kiwi winner of this event and follows in the footsteps of Major-winning countryman Michael Campbell, who won at Wentworth Club in the 2005 World Match Play Championship.
"I'm immensely proud," he said. "It's such an iconic tournament. I know Michael Campbell has won around here when it was the match play event and to add to that history here and create some of my own is very special.
"I've got an almost three-year-old and a four-month-old standing over there and to have them here to support with a place pretty close by where we can stay at home this week just made the week.
"We have been through a pretty tough year as a family. We lost my father-in-law in June after a really, really short battle with cancer and that kind of rocked the family. It's been tough going back and forth.
"To come over here and have a good week in Ireland last week and this, I don't think I could have wished for better."
He added: "To have a back nine like that, especially after how I started the day, it's amazing. I played great. Pretty much didn't miss a shot from the third hole onwards and saw a couple of putts go in and it was a pretty cool feeling on the last to sort of know I had one to win and actually make it."
Overnight leader Ludvig Åberg saw his lead trimmed to one as he found sand at the first and, while he hit back by getting up and down from a bunker on the fourth, a double-bogey after a poor chip and missed short putt at the fifth knocked him off the top of the leaderboard.
In the group ahead, Fox also had a ragged start, surrendering that triple-bogey after losing a ball on the third but better was to come for the 36-year-old.
It was Hatton who replaced Åberg at the summit, following a tee-shot to 13 feet at the second and an approach to four feet at the third by hitting the pin at the fifth and holing a bunker shot at the sixth.
He led by two with a seven-footer at the seventh and while he dropped a shot at the next, he holed a lengthy putt from just off the tenth green and added another birdie from ten feet at the 11th to lead by four.
Fox had responded to his early troubles with smart approaches to the sixth and eighth but really came to life in the pouring rain on the back nine, leaving himself just three feet on the tenth, holing from the fringe on the 11th and getting up and down from the sand on the 12th.
A tee-shot to eight feet on the 14th had him within one and he would soon share the lead, with Hatton going out of bounds on the 15th. The Englishman put his second shot off his provisional to six feet for bogey but had to wait an hour and 23 minutes to hit and make his putt after a lightning delay.
Fox was relentless, however, and despite going left and finding the trees off the 15th tee, he hit a stunning second to nine feet and rolled home to lead on his own.
It's such an iconic tournament. To add to that history here and create some of my own is very special
Rai was level par for the day after 12 holes, cancelling out bogeys on the first and 12th with smart approaches to the sixth and 11th but he put irons inside four feet on the 13th and 14th and holed a ten-footer on the 16th to get to 16 under.
Hatton played a lay-up on the last and birdied from eight feet for a 66 to put the pressure on and Rai was inches from making an eagle and forcing a play-off in his closing 68.
But Fox produced that late gain of his won to take the title, sparking huge celebrations around the green in front of the sell-out crowd.
Rahm recovered from a hat-trick of bogeys on the front nine to come home in 32, while Hovland had a birdie-birdie finish in a 67 and Fleetwood signed for a level-par 72.
Shinkwin also carded a 72, while Scott signed for a 68 to finish a shot ahead of Swede Åberg, who made one further birdie and bogey in a 76, South African Hennie Du Plessis, Austrian Sepp Straka and Scot Connor Syme.