The 19th seed outfought and outfired the former world No.1 in the first set and held her nerve when Sharapova broke early in the second set.
But the Russian began to build a remorseless momentum to grind down Stosur with her accuracy from the baseline.
Sharapova broke for a 5-4 lead to take the second set and raced to a 3-0 lead in the third after winning 17 of 20 points.
"It was so difficult in the beginning, Samantha was playing so well, but I got energy from the crowd," Sharapova said.
"I'm so happy to be back in the quarter-finals, it's such a special tournament for me. "It's a big step but when you get there it will get more difficult. Hopefully I will raise my level."
Sharapova is favourite to win the title after the early exits of defending champion and world No.1 Serena Williams and second seed Li Na, although Simona Halep of Romania is the fourth seed and in great form.
The difference between Sharapova at the start and finish of the match was huge - her serve took a set and a half to find its groove and Stosur's energy clearly discomfited her opponent.
Stosur broke for 4-3 in the first set, on her fourth break point when Sharapova netted a forehand, and then did it again in the final game of the set when the Russian double-faulted on set point.
Stosur hit long with the court at her mercy on break point to lose the first game of the second, but she broke back for 2-2. The Australian took a 4-3 lead but that was as good as it got, because Sharapova was now motoring, her shots finding the corners and Stosur could not keep up.
A net cord gave Sharapova a break for 5-4 and Stosur hit long to lose the set.
The Australian gradually had the life squeezed out of her as games came and went before Sharapova wasted her first match point with a double fault and then delivered the final blow.
Watch all the action from the French Open on up to seven courts on the Eurosport Player.
Results from the French Open Women's Singles Round 4 matches on Sunday
Garbine Muguruza Blanco (Spain) beat Pauline Parmentier (France) 6-4 6-2
7-Maria Sharapova (Russia) beat 19-Samantha Stosur (Australia) 3-6 6-4 6-0
14-Carla Suarez Navarro (Spain) beat Ajla Tomljanovic (Croatia) 6-3 6-3
18-Eugenie Bouchard (Canada) beat 8-Angelique Kerber (Germany) 6-1 6-2
- Sports & Recreation