Molinari, who had two wins and two second places in his previous five starts this season, carded a nerveless closing 69 at windswept Carnoustie to finish eight under par, two shots clear of Justin Rose, Rory McIlroy, Kevin Kisner and Xander Schauffele.
Playing alongside a rejuvenated Tiger Woods, Molinari followed 13 straight pars with a birdie on the 14th and finished a brilliant round in fitting style with another from just three feet on the 18th.
Rose, who had birdied the 18th in the second round just to make the cut, followed his record-equalling 64 on Saturday with a 69, while McIlroy recovered from a slow start with the aid of an eagle on the 14th to record his third straight top five in the Open.
Defending champion Jordan Spieth went into the final round tied for the lead with fellow Americans Schauffele and Kevin Kisner, but stumbled to the turn in 39 and Kisner managed one shot worse to throw the tournament wide open.
For much of the afternoon it looked as though everything was falling into place for Woods to pull off a barely believable victory, his first of any description since 2013, what would have been the 15th major of his amazing career and a first since the 2008 US Open.
Birdies at the fourth and sixth took Woods to the turn in 34 and, with the leaders crumbling, gave the 42-year-old a one-shot lead over playing partner Molinari and Spieth, who had double-bogeyed the sixth after hitting his second shot into a gorse bush.
But just when one of the greatest sporting comebacks of all time seemed on the cards Woods failed to pull off a risky flop shot to get out of trouble on the 11th and ran up a deflating double bogey.
Another dropped shot on the next effectively ended his chances, but the drama was just beginning elsewhere, McIlroy following birdies on the ninth and 11th with an eagle from 35 feet on the 14th.
That vaulted McIlroy into a six-way tie for the lead and Rose joined the expanding group on six under with a tap-in birdie on the 18th, his fourth in succession on the closing hole. His second on Friday had been required just to make the cut on the mark of three over par.
Molinari broke out of the pack with his first birdie of the day on the par-five 14th and up ahead McIlroy had to settle for joining Rose in the clubhouse lead after failing to birdie the last.
Schauffele, who had struggled to the turn in 40, birdied the 10th and 14th to join Molinari in the lead, but bogeyed the 17th and was unable to find the magical eagle finish required on the last to deny Molinari a deserved victory.
Spieth’s attempt to become the first back-to-back Open champion since Padraig Harrington in 2008 came to a miserable end with a closing 76 to finish four shots off the pace.
McIlroy was pleased to be back in the hunt for a major title despite ultimately missing out at Carnoustie.
The former world No 1, chasing his first major in four years, said: “It was great, just to be a part of it and hear the roars, Tiger being back in the mix – everything.
“There were a lot of big names up there and it was nice to be a part of it. For a while I thought Tiger was going to win and my mindset was, ‘go and spoil the party here’.
“It was cool, really cool. I have no regrets. I played the way I wanted to play this week and it gives me a lot of encouragement going into the final major of the year.”
McIlroy was left to wonder what might have been after settling for pars on the last four holes, but he feels his game is now in good shape.
The 28-year-old said: “I’m happy with how I played. I didn’t get off to a great start, but I hung in there, and I battled back. Just sort of ran out of holes at the end.
“I’ll look back at this week and be very encouraged about what I’ve done, and the golf that I played, and I feel like that will stand me in good stead for what’s coming up.”
Rose rekindled his love of the Open after finally surpassing his teenage heroics of two decades ago.
He finished in a tie for fourth as a 17-year-old amateur at Royal Birkdale in 1998 and had recorded just one other top 10 in 15 subsequent appearances, despite having won the US Open in 2013 and Olympic gold in 2016. But the 37-year-old put that disappointing statistic behind him with his tie for second at Carnoustie.
“It just proves to me that I can play well in this tournament. That I can win the Open,” said Rose.
“When I’m in the hunt I enjoy it. I play my best golf. I don’t back away. It was great to get the crowd behind me. I hadn’t felt the energy of the crowd for a while in the Open. That was a real positive for me and it renews the love of the Open for me.”
Rose looked to be out of contention after playing his first 13 holes in one over par, but hit the pin with his approach to the par-5 14th to set up a tap-in eagle and birdied the 18th for the fourth day running after contemplating holing his second shot on the 18th, rekindling memories of the way he pitched in for a birdie on the 72nd hole at Birkdale in 1998.