Sharapova, competing at her first major since returning from a doping ban, triumphed in three sets against second seed Simona Halep in her opening match at Flushing Meadows and displayed similar levels of grit to set up a third-round clash with either Sofia Kenin or Sachia Vickery.
The Russian, US Open champion in 2006, paid the price for sloppy errors in the opening set, twice letting Babos off the hook immediately after breaking her serve.
However, former world number one Sharapova continued to fight and showed tremendous resilience to stay in the match in the second before powering on to victory in two hours, 19 minutes.
The 30-year-old quickly found herself at a disadvantage when a backhand volley found the net in the opening game but drew level at 2-2 when Babos went long after an awkward rally.
The Hungarian defended well, though she failed to take two occasions to serve out the set, the latter coming after Sharapova failed to consolidate a break for the second time and resulting in a tie-break.
A wild forehand and a double fault from Sharapova gave Babos a 4-1 lead and the world number 59 ensured another opportunity to claim the set did not slip through her fingers
The Russian did not dwell on the setback and began the second set by breaking her opponent, but her advantage was lost when Babos dug in to force herself level in game four.
Despite seeing a backhand volley clip the net cord twice before dropping her side, Sharapova held in a tense sixth game and converted break point at the third time of asking in the next to force a decider.
Boosted by momentum swinging her way, Sharapova broke to love in the opening game of the third and there was no looking back after she moved 4-1 up, winning the first match between the duo.
Sharapova bt Babos 6-7 (4-7) 6-4 6-1
Sharapova - 39/36
Babos - 13/24
Sharapova - 12/6
Babos - 0/1
BREAK POINTS WON
Sharapova - 8/13
Babos - 4/10
FIRST SERVE PERCENTAGE
Sharapova - 61
Babos - 68
PERCENTAGE OF POINTS WON ON FIRST/SECOND SERVE
Sharapova - 78/38
Babos - 59/29
Sharapova - 108
Babos - 84