It was the 27-year-old Russian's fifth Grand Slam title, bringing her level with Martina Hingis on the all-time list and it came 10 years after she won her first major at Wimbledon 2004.
Sharapova, who completed a career sweep of all four Grand Slam titles in Paris in 2012 before losing to Serena Williams last year, also moved to number two on the all-time prize money earnings, with only the American ahead of her.
But it took all her legendary grit and resolve to recover from the agonising loss of the second set on a tie-break after she had stood just two points away from the title at 5/3.
"It's the toughest Grand Slam final I have ever played," said Sharapova.
"I can't believe that at 27 I have won the French Open more times than any other Grand Slam."
The consolation for Halep, whose meteoric rise to the top bracket in women's tennis over the last 18 months has projected her as a potential champion, was that she will climb to a career-high third in the world rankings.
"I wish to have many more (Grand Slam finals), but this will be special for me all my life. I had two incredible weeks here and I played my best tennis," she said.
The two finalists reached the championship match in starkly contrasting styles.
Fourth-seeded Halep did not drop a single set in her six matches, while seventh-seed Sharapova needed to battle back from first set losses in her three previous outings.
But experience was massively on the Russian's side. This was her ninth Grand Slam final dating back 10 years, while Halep was playing in her first at the age of 22.
Sharapova also towered over her opponent at 1.88 metres compared to Halep's 1.68 metres.
It was yet another shaky start from Sharapova as the final got underway on a sun-splashed and sultry centre court.
She dropped serve in the first game and was soon 2-0 down, but the Russian promptly found her range and she was back level after a thrilling fourth game that saw several deuces and some big hitting from both ends.
In what was developing into a final of the highest quality, the first five games all went to deuce, but it was Sharapova who gradually gained the ascendancy.
She broke Halep's serve again, this time to 15, to lead 4-2, but three games later her suspect serve once more let her down and the Romanian broke back.
Halep though was unable to level the score as she dropped serve for the third time, handing Sharapova the set in 57 minutes.
Sharapova opened the second set with a confident love game on serve and then came out on top in another lengthy deuce tussle to move 2-0 ahead.
The biggest earner in women's sport and global superstar was in the driving seat, but her level unaccountably dipped as Halep broke back to level at 2-2.
Two double faults to start the next game had Sharapova looking anxious, but she compensated with some hefty hitting off both flanks to regain the lead.
Three games later the Russian squandered two break points to serve for the match and she played a sloppy service game to follow allowing Halep to break from 15-40 down.
Halep was twice unable to serve out for the set, but she stunned Sharapova in the ensuing tie-break, winning four points in a row from 5-3 down to level the set scores.
The final was into the third set for the first time since 2001 when Jennifer Capriati defeated Kim Clijsters 12-10 in the decider and it was Sharapova who found a new gear just when she needed it.
The Russian broke clear to lead 4-2, before Halep once again reeled her in to level at 4-4.
But the 16th break of serve in the next game finally saw Sharapova on the way to stagger past the winning post after three hours and two minutes of enthralling tennis.