Saints were on course for their first home league win against the Red Devils since 2003, with Jan Bednarek and James Ward-Prowse giving them a two-goal cushion heading into half-time.
But United boss Solskjaer’s decision to turn to summer signing Cavani at half-time proved inspired, with the veteran striker setting up Bruno Fernandes before scoring a brace to seal a 3-2 triumph at the death.
United have come from behind to win all of their away league matches this season, with this victory extending their winning run on the road to a club record eight match in succession.
“I thought we played well all day,” Solskjaer said. “We created some big chances.
“Of course they have the quality of James Ward-Prowse, which is always difficult to defend against, so coming in at half-time we have to make changes and Edinson made a great impact.
“We know he is one of the cleverest and best movers in the box, he can peel off you, get in front of you. Sometimes it works for you and he certainly had an impact today.
“(The never say die attitude) is very important and a trait that Man United always should have. Never give up, never give in.
“I don’t know how many times I was on the pitch and we came back and won games towards the end.
“We had a manager who never, ever allows anyone to give up and I have to say that’s one of my values.
“I have to say if you don’t play well at least work hard and never give in.
“Show that you give everything for your team and, even though I think we played really well today, I think we showed we had a character to dig in when the result looked to go against us.”
Solskjaer’s side showed great spirit at an empty St Mary’s, where Cavani was uncharacteristically unprepared before his stunning introduction.
“He’s got all the attributes of a top-class footballer and human being,” the United boss said.
“He’s had a great career, scored goals wherever he has been.
“He’s so professional, meticulous with his preparation, with his recovery, what he does at mealtimes, before the game, during the game, so I was surprised that he didn’t have his boots ready when the second half started!
“But also to have a focal point in the box is important for us because we’ve not really had that since Romelu (Lukaku) left.
“Anthony (Martial), Marcus (Rashford), Mason (Greenwood) they’re different types of forwards, so it gives us a great balance and a mix.
“We wanted to mix it up and Edinson had a great impact.”
Dean Henderson joined Cavani in coming on at half-time after David De Gea picked up a knock when trying to stop Ward-Prowse’s free-kick.
“It’s a knock just above the knee, so we’ll have a scan and a check on him tomorrow,” Solskjaer said.
“Hopefully he can be ready for Wednesday (against Paris St Germain in the Champions League) but I can’t promise you anything now.
“Dean came on, very assured, had a couple of half saves to make but he was tidy and safe with the ball at his feet as well.”