The 18-year-old midfielder's first Premier League goal shocked Molineux in stoppage time after Pedro Neto's leveller looked to have snatched a point for the hosts just two minutes earlier.
Rashford had earlier scored and helped assist Rasmus Hojlund after being disciplined by boss Erik ten Hag.
He called in sick on Friday and was omitted from the squad for Sunday's FA Cup win at Newport having reportedly gone drinking in Belfast last week.
But it was an excellent comeback from Rashford, with United climbing to seventh in the Premier League and inflicting Wolves' first home defeat since September to end their seven-game unbeaten run.
Rashford was reportedly doing tequila shots during his Belfast bender and those in charge of the music on Thursday clearly saw the funny side, playing the Terrorvision hit Tequila before kick-off.
But the England forward enjoys Molineux and last season the 26-year-old was benched for being late for a team meeting before coming on to score the winner.
This time he took just four-and-a-half minutes to start his new redemption arc.
The striker then curled a fine effort beyond Jose Sa for his third goal in his last four games.
It sparked the United fans into chanting 'Rashford's on the piss' as they cheekily saluted the striker.
While it had been Wolves' worst display this season early on there was belief the hosts could level and they did in the fifth minute of stoppage time when Neto fired in on the break.
But a chaotic ending was capped by teenager Mainoo's stunner when he rode two challenges and curled into the bottom corner in the seventh minute of added time.
Earlier, Kalvin Phillips started his loan spell at West Ham with an error that led to a goal inside three minutes of a 1-1 draw with Bournemouth in the Premier League.
The England midfielder's loose back-pass under pressure went straight to Bournemouth striker Dominic Solanke, who had the simple task of slotting home from close range for his 13th league goal this season.
Phillips' debut lasted 68 minutes before he was substituted, by which time West Ham had equalised through James Ward-Prowse's penalty in the 61st after Mohammed Kudus - recently returned from playing at the Africa Cup of Nations for Ghana - was tripped.
Phillips joined West Ham last week on a six-month loan from Manchester City, where he remained out of favour midway through his second season at the champions.
He'll be hoping the move secures him guaranteed playing time ahead of the European Championship in Germany starting June.
The point kept West Ham in sixth place, seven points behind Aston Villa in fifth. Bournemouth moved up one place to 12th.