David Moyes' side knew victory in their UEFA Champions League Group A clash in San Sebastian would put them on the brink of qualification for the knock-out phase and eliminate the Spanish strugglers.
But they failed to take advantage of the few opportunities they created in an often lacklustre display, with Hernandez somehow blazing over the bar from six yards out with the goal at his mercy after the chance was put on a plate by Shinji Kagawa early in the second half.
Moyes sent on Ashley Young and Van Persie in place of Wayne Rooney and Hernandez and in seconds the duo combined for the Holland international to fire against the post from a tight angle after a low cross.
And Van Persie then struck the same upright from the penalty spot in the 70th minute after Markel Bergara had been very harshly penalised for bringing down Young, who made the most of what minimal contact there was.
Marouane Fellaini saw red in the closing moments after receiving a second yellow card for a clumsy and needless clip of David Zurutuza's heels, with referee Nicola Rizzoli's patience finally running out with the muscular midfielder.
It was the first time Van Persie had missed from the spot since his failure at Southampton in the first weeks after his arrival from Arsenal. He atoned for that miss by scoring a match-winning hat-trick.
There were no such heroics here and with Fellaini red-carded for the first time in his United career for a second yellow card, the visitors were forced to see out the contest with 10 men.
However with the other game in the group also ending goalless, no damage was done to United's chances of reaching the last 16, which they will reach with a win from either of their two remaining fixtures.
A mediocre opening period saw plenty of industry, with Rooney darting back well inside his own half to rob Carlos Vela after his misplaced pass gifted possession to the former Arsenal man.
Chris Smalling also put a shift in at right-back whilst, on his 950th appearance, Ryan Giggs tried to cajole a bit more from the visitors.
Kagawa was responsible for one rare shot, at the end of the best move of the match. Patrice Evra delivered a superb low cross into the box, which Rooney flicked back towards the Japan star.
Kagawa's shot was tame though and would not have troubled the Sociedad goal even without the deflection that took it wide.
Fellaini brought a bit of life to proceedings when he caught Bergara with a tackle that upset his opponent and earned the Belgian a yellow card.
Alberto de la Bella curled a shot wide as the drab opening period limped towards its conclusion.
In Hernandez's inexplicable miss alone, the second half contained more to discuss than had gone before.
There certainly appeared no plausible excuse for his woeful miss, skying high over the net from only six yards after Kagawa's cross had rolled perfectly into his path.
Hernandez was replaced not long afterwards as part of a double substitution that also saw the exit of Rooney as Van Persie and Young were introduced. Moments later, the latter was crossing for the former, from much the same spot as Kagawa had delivered for Hernandez.
Van Persie's angle was acute. The power behind his shot was impressive though as the ball shot back off the near post. The Dutchman seized on the rebound but from 20 yards could only curl wide.
Finally though, the game had sprung to life. And when Young went to ground with Bergara booked, Van Persie had the chance to score from the spot, only to fail from 12 yards.
Sociedad countered and Xabi Prieto's goalbound effort was deflected over by Carlos Vela's improvisation with his chest.
The hosts got no closer, even after Fellaini had departed in the final minute.