Sharapova trailed by a set to love, and once again, required three sets like she did when she got past the world number two Simona Halep earlier this week.
And she needed three sets to get past the unseeded Babos, prevailing 6-7, 6-4, 6-1.
Sharapova is making her return to the US Open after serving a 15-month doping suspension.
Babos made much of the early running and took the opener to a tie-break.
The Hungarian battled hard and clinched the set when Sharapova shanked her shot long.
Babos shouted ‘Come On’ in an effort to gee herself up, while Sharapova cut a frustrated figure on the other side of the net.
Sharapova was slowly finding her feet and she got the vital break in the second set.
Cue a shout of ‘Cmon Maria’ and the Russian was now on top.
After taking the set, the 2006 US Open champion raced to a 4-1 lead in the third.
Sharapova was cornering Babos and though she wasted a couple of match points, she confirmed her place in round three when Babos misfired and hit her forehand wide.
Sharapova will now face either USA’s Sofia Kenin or Sachia Vickery in round three.