Hernandez put the hosts ahead with an impudent first-half back-flick, his ninth goal of the season.
But after Dean Whitehead had nodded home a shock equaliser for Stoke at the start of the second-half, Nani restored the hosts' lead with a precise curling strike that extended their unbeaten run this term to 20 matches.
Hernandez had one early sprint into the Stoke box but his cross flicked off Huth, straight into the waiting arms of Asmir Begovic.
Patrice Evra played a neat one-two with Ryan Giggs before rolling a pass inside to long-range specialist Darron Gibson, who let fly with a 30-yard effort that Begovic was able to watch roll wide.
Rafael was lucky to escape a booking for his wild lunge on Marc Wilson.
Andy Wilkinson won his side a corner when he exploited space outside the United box and fired in a shot that Nemanja Vidic had to turn behind.
The Serbian then cleared the corner too as Stoke filled the penalty area with their posse of six-footers.
Had Danny Collins done rather better when he attempted a cross from the Stoke left, United might have been in trouble, then Wilkinson slid in at the other end to prevent Dimitar Berbatov finding himself in a decent shooting position.
Gibson's shot from a Berbatov lay-off was deflected wide before Tuncay came off worst in a collision with Evra and needed treatment.
It took a diving header from Vidic to clear when Gibson only succeeded in flicking Rory Delap's long throw deeper into the United box.
The hosts finally created their first decent chance midway through the half when Giggs' 20-yard strike deflected sideways off Ryan Shawcross straight to Berbatov.
It took the Bulgarian just one touch to control but, his second, off balance, only resulted in him prodding the ball narrowly wide from six yards.
Giggs curled a free-kick over shortly afterwards following Huth's late challenge on Nani.
Hernandez then delayed a pass to Giggs for too long. The lack of pace meant the Welshman had to check inside onto his weaker right foot and the chance went begging.
The little Mexican did not wait long to make amends though.
Nani's delivery was rather better from a deeper position, which allowed Hernandez to get in front of his marker at the near post.
The finish was audacious, a flick with the back of his right boot which left Begovic motionless as it flashed past him.
Nani curled a free-kick over as United tried to press home their advantage.
Am ambitious 30-yard effort from Wilson sailed harmlessly into the Stretford End before a curler from Nani bent the wrong way and ended up nearer the corner flag than the goal.
Sir Alex Ferguson was out of his dug-out to berate the linesman who somehow concluded that Hernandez's effort from a Nani nod-down had not sailed wide after hitting a Stoke foot.
Matthew Etherington advanced into space to run at the United defence, but his shot was poor and did not threaten Tomasz Kuszczak.
It took a timely intervention from Darren Fletcher to prevent Etherington picking out Kenwyne Jones inside the United box.
Tuncay then did nod wide as Stoke maintained their early offensive.
Giggs brought groans of despair from the home supporters when he elected to try and lay a pass off to Nani in a wider position than go for goal himself.
The hosts really did have something to moan about shortly afterwards though as Jones fed Tuncay, who managed to find enough space on the left flank to float over a cross that found Dean Whitehead completely unmarked.
Kuszczak desperately tried to get across his goal but despite getting a hand to the ball, he was unable to keep it out.
It was Stoke's first goal in nine Old Trafford visits, dating back to 1980.
Berbatov was quick to vent his frustrations with Nani for failing to supply him with the early pass he was screaming for as another United attack broke down.
Yet this team continues to confound its many critics. And when Hernandez slipped a pass to Nani, the Portugal winger was given time to turn on the edge of the area.
It proved to be a fatal mistake as Nani quickly took aim with a curling shot that found the corner of Begovic's goal.
Jermaine Pennant and Jon Walters replaced Etherington and Delap as Tony Pulis looked to change the course of a game that now seemed set against his team.
Pulis' final change was Ricardo Fuller for Jones, who had not really made his mark on proceedings, before Michael Owen and Michael Carrick were introduced in place of Hernandez and Gibson.
Giggs clipped Rafael's cross over, then Nani earned a corner for his team as the clock ticked down, but Rafael's cross was poor when it eventually came.
The Brazilian thudded into the advertising hoardings as he pushed forward at another United attack and although Stoke had one last push for an equaliser, they failed to make it count.