The Red Devils were made to work for maximum points and were made to rue several missed chances in the first half before a calamitous pass from Andre Onana gifted Jayden Bogle a 35th-minute opener for the Blades.
Harry Maguire equalised against his former club on the stroke of half time, but Sheffield United were ahead again just five minutes after the break courtesy of Ben Brereton Diaz. However, Bruno Fernandes came to the rescue for Man United with three goal contributions in the final half-hour to turn the game on its head.
The Red Devils captain converted from the penalty spot before netting a 25-yard screamer to increase his goal tally for the campaign to 15, and he capped his standout display with a perfectly-weighted assist for Rasmus Hojlund to tap home from close range.
Man Utd gain top-six advantage as relegation looms for Sheff Utd
Three days on from surviving an almighty scare against Coventry City in the FA Cup semi-finals, Erik ten Hag's side avoided another upset to end their four-match winless streak in the Premier League.
Victory has seen them climb to sixth in the top-flight standings, three points clear of Newcastle United, who have slipped to seventh after losing 2-0 at Crystal Palace.
As for Sheffield United, they are now 10 games without a league win and have now conceded a total of 92 goals this season, a new Premier League record that surpasses the 89 shipped by Derby County in the 2007-08 campaign. Chris Wilder's men remain rooted to the foot of the table and sit 10 points adrift of safety with just four games left to play.
Defeat at Old Trafford does not confirm relegation for the Blades, but their anticipated return to the Championship will be official if they lose away against Newcastle on Saturday. Even if they were to draw or win against the Magpies, Sheffield United will be relegated if 17th-placed Nottingham Forest match or better their result when they host Manchester City on Sunday.
Maguire saves Onana's bacon in tight first half
Man United almost made the perfect start as Diogo Dalot, on his 150th appearances for the Red Devils, had a long-range curling shot tipped over by Foderingham inside the first 30 seconds.
The Red Devils were the dominant side in possession and the majority of their chances fell to Alejandro Garnacho, a livewire throughout down the left flank, who should have opened the scoring with arguably the hosts' best chance midway through the first half.
Following a bursting run and a neat exchange inside the area, the Argentine delaying his shot before striking to the left of Foderingham, who got down well to palm the ball away from danger.
Foderingham, returning to the first XI at Ivo Grbic's expense and seeking to prove a point to Wilder having spent much of 2024 sitting on the bench, made a plethora of crucial saves to keep the Blades in the contest, while Onana was rarely called into action until his blunder on the ball in the 35th minute.
Onana intended to pick out Dalot with a simple pass across the deck from inside his six-yard box, but the onrushing Bogle nipped in brilliantly to intercept and drive forward down the right channel before slotting a composes finish in at the near post.
Sheffield United were unable to enter the break ahead, though, as the Red Devils restored parity three minutes before half time when Garnacho's curling cross from the left was met by Maguire, whose glancing header crept into the far corner.
Maguire netted his second goal in as many home meetings with his former club Sheffield United, having previously found the net in a 2-1 defeat in January 2021.
Bruno brilliance helps Man Utd avoid upset
Sheffield United made a positive start to the second half, which was rewarded with a goal just five minutes after the interval. Dalot was unable to clear his lines, allowing both Gustavo Hamer and Ben Osborn to combine down the left before the latter played a perfectly-weighted pass towards Brereton Diaz, who smashed home a first-time finish from around eight yards out.
The travelling Blades supporters were in full voice after regaining the lead, but they were quickly silenced when Dalot - playing at left-back - made a striker's run through on goal. However, Austn Trusty tracked back well to prevent the Portuguese from firing at goal - a wasted opportunity for the hosts.
United were soon presented with another opportunity to level the scores, and although Blades substitute Vinicius Souza poked the ball into his own net when defending a corner, referee Michael Salsbury blew his whistle to award the hosts a penalty a fraction earlier, after Maguire was dragged to the ground by Trusty. Fernandes stepped up and sent Foderingham the wrong way with a thumping effort from 12 yards.
Brereton Diaz thought he had put Sheffield United back in front in the 67th minute, but his shot from range ricochetted off Maguire, and bobbled narrowly wide of Onana's right-hand post.
Both teams were carrying a threat and fancied their chances of netting a late winner heading into the closing stages, but a moment of magic from Fernandes proved decisive nine minutes from time.
After receiving the ball from the right, Fernandes turned inside and unleashed a stunning 25-yard strike into the top corner; the shot may have taken the slightest of deflections off the head of Trusty, but Foderingham had no chance with his one.
Fernandes then turned provider for Hojlund just three minutes later when he scooped a cross into the path of his Danish teammate to slide home a fourth and seal an important victory for both Ten Hag and Man United.
The Red Devils will now turn their attention to another fixture against relegation-threatened opposition in the form of Burnley on Saturday, while Sheffield United travel to St James' Park for their next match against Newcastle.