Strikes from Peter Crouch and Marko Arnautovic put the Potters on course for a shock win at Old Trafford, but a late United rally salvaged three points.
The Premier League champions were once again out of sorts on their own turf and looked to be heading for defeat as a Peter Crouch effort and a sublime Marko Arnautovic free kick sandwiched Robin van Persie's equalizer.
However, Wayne Rooney leveled the score in the 78th minute before substitute Chicharito netted a dramatic winner two minutes later.
David Moyes' men looked to be heading for a third straight home match without victory in the Premier League, in another out-of-sorts performance at Old Trafford. Crouch toe-poked Stoke ahead before van Persie fired home a rebound from Rooney's header.
Arnautovic's free kick appeared to have handed Stoke the three points, but headers from Rooney and Hernandez in the closing stages ensured Stoke is still looking for its first Premier League victory over United.
Van Persie returned from a toe injury that kept him out United's 1-0 victory over Real Sociedad on Wednesday, while former United striker Mark Hughes brought in Crouch to lead Stoke's attack.
Stoke exploited United's recent home frailties right from the start and was rewarded with the opener in just the fourth minute. Erik Pieters burst through three challenges before crossing from the left and Crouch's initial shot was saved at point-blank range by David de Gea before Jonny Evans' attempted clearance rebounded off the striker and into the net.
Moyes' men were wasteful in possession and were nearly punished further when Crouch hit a first-time volley at full stretch that narrowly cleared the crossbar. Stoke came even closer when Jonathan Walters hit a half-volley from 12 yards and drew a smart save from De Gea.
The United faithful were becoming restless, but the home side gave them something to cheer about with an equalizer three minutes before the break. Rooney's back-post header was well saved by Asmir Begovic and van Persie was on hand to fire in the rebound.
However, Stoke immediately restored their lead when Arnautovic curled a sublime free kick from the left that hit the bar and bounced into the goal with De Gea scrambling to attempt to make the save.
United upped the intensity after the break but only had blocked efforts from Rooney and van Persie to show for its efforts. Defensive confusion nearly led to Walters breaking clear in the 64th minute, but De Gea sprinted 40 yards off his line to make a vital interception.
Rooney restored parity in the 78th minute when he lost his marker to head home from van Persie's corner.
And the home fans were once again on their feet with 10 minutes remaining when good work from Patrice Evra on the left led to the Frenchman hanging up a cross and Chicharito adding the header from 6 yards.
The win is just United's second in the league this season, while Stoke's winless run in the top flight extended to six matches.