United entered the weekend second in the standings but the wheels came off in Yorkshire as Mooy's opener was followed by Depoitre capitalising on Victor Lindelof's error, with Huddersfield holding on for a dream 2-1 win after Marcus Rashford ensured a nervy ending.
Wagner's side were made to sweat but showed no sign of intimidation as they heeded the advice of their raucous fans, whose banner as the teams emerged read "if you have passion and desire you have no limits!" The words echo the philosophy that saw Huddersfield win the play-offs - and there is no doubt this win is right up there with this year's Wembley triumph.
A feisty occasion took a surprise turn midway through the first half as Mooy robbed Juan Mata of possession and eventually fired home after David De Gea parried Thomas Ince's shot. Lindelof, on minutes earlier for the injured Phil Jones, was turned inside out by Ince and things soon got worse for the substitute, who embarrassingly misread goalkeeper Jonas Lossl's long ball to gift Depoitre a chance he lapped up.
Mourinho has never won a Premier League game when two goals behind and that statistic did not change at the John Smith's Stadium, where Rashford headed home on an afternoon when United's display was as grim as the weather. Huddersfield's performance belied that of a side who lost 4-0 to Tottenham in their last home match, beginning with intensity that showed no let up.
United needed to be up for the fight and Anthony Martial took it too far in the early stages, kicking out at Tommy Smith having been irked by the Town captain's challenge. Referee Lee Mason booked both players after they squared up, setting the tone for a feisty first half that saw Romelu Lukaku and Elias Kachunga trade shots on target.
The former tried an acrobatic shot and Ander Herrera dragged wide as it looked like United started to settle, only for Jones' injury to throw their afternoon off kilter.
Within five minutes of the change, Mooy all too easily dispossessed Mata around the halfway line and burst towards the United goal before playing through the overlapping Ince. The winger turned Jones' replacement Lindelof inside out to get away a shot that De Gea could only parry into path of Mooy to rifle home and send the Huddersfield fans wild.
Elation turned to disbelief in the 33rd minute as the home side scored again. Huddersfield goalkeeper Lossl hit a long ball and Lindelof somehow misread it, dropping for Depoitre to easily round De Gea and slot home.
It was the first time since October 2016 that United had conceded two goals in the first half of a Premier League game, with Herrera seeing a penalty claim ignored and Nemanja Matic fizzing wide before half-time.
Rashford and Henrikh Mkhitaryan came on at the beginning of the second half for Martial and Mata as the rain poured in Yorkshire, with play swinging from end-to-end in miserable conditions. Ashley Young's effort wide was the best United could muster until the 76th minute when Lossl denied Herrera.
Within two minutes, though, there was hope for Mourinho's side as Lukaku swung in a cross and Rashford caught the backline napping to head home. United peppered the box with crosses in an attempt to eke out a leveller, while De Gea had to race out to prevent matters getting worse.
Chris Smalling had a late effort blocked during a chaotic ending, but Huddersfield held out and a remarkable din greeted the final whistle.