By SABC Sport
2nd February 2024
The returning star then played a part in Rasmus Hojlund's bundled second, before United bounced back as substitute Scott McTominay scored shortly after Pablo Sarabia had converted a softly-awarded penalty.
But United wobbled and looked set to blow a much-needed win as Max Kilman scored before Pedro Neto equalised in stoppage time, only for Mainoo's moment of magic.
The 18-year-old showed skill and courage to take on the Wolves backline, before bending home to win it at the death and spark wild United celebrations.
"To be honest, I had mixed feelings," boss Ten Hag said after the breathless clash. "One side very pleased, of course it's a massive win this.
"I think for a neutral fan, spectator of this game, it was great to see but as a manager when you see you dominate a game for an hour, you should go 3 or 4-0 by the hour, because we had the chances and we conceded nothing.
"But then the way we concede the goals we should manage that better on the pitch, this can't happen.
"But then you see the spirit of the team and the resilience and especially in Kobbie Mainoo, that is great to see.
"We have the right character, the spirit in the dressing room is very good when you can show this."
Mainoo was part of the United team that won the FA Youth Cup in 2022 and caught the attention of Ten Hag shortly after he arrived that summer.
The midfielder has made 13 appearances so far this term and would have played more had it not been for an unfortunate injury sustained against Real Madrid in a Houston pre-season friendly.
"I think very quickly I saw him," Ten Hag said. "I think last autumn I saw him for the first time and at that moment I thought he was playing a little bit too comfortable in the Under-21s, he should be much more dominant.
"We pushed him a lot by that side, by pushing him in training and you see he makes such good progress and he is almost progressing from game to game.
"And of course, it's wonderful to see and I hope he stays calm like he is, as he did with his goal as well.
"He is determined, he is a good character and I hope he keeps going with this progress."
Ten Hag also praised Rashford as the United forward produced an impressive response to days of negative headlines and an internal disciplinary.
"I think the whole team played very good, Rashy as well," the Dutchman said.
"Maybe you know that, you see the last games, there is coming about in the front line and if they get the service in the back they are a threat for every opposition."
As for opposition manager Gary O'Neil, the last-gasp defeat was compounded by Wolves' inability to bring in a striker on deadline day.
They made an approach for Chelsea's Armando Broja but could not make the loan signing within the Premier League's profit and sustainability rules, with the striker instead heading to Fulham.
"We couldn't afford to do it financially, where it ended up," O'Neil said.
"But we haven't been deducted 10 points, we're still together, we're still putting in performances that show we're all together. We'll try and keep it moving that way."