Jan Bednarek's header and a fine James Ward-Prowse free-kick had Saints dreaming of a first home league win against the Red Devils since 2003.
But Ralph Hasenhuttl's men squandered their two-goal lead as half-time introduction Cavani turned the match on its head, setting up Bruno Fernandes before netting a brace to secure a sensational late triumph.
It was the 10th time that United had come from behind to beat Southampton in Premier League history - a victory that propelled them up the standings and continued their 100 per cent start to life on the road.
Few could have foreseen this outcome when Ward-Prowse superbly beat David De Gea shortly after sending in a smart corner for Bednarek to open the scoring at an empty St Mary's.
Solskjaer turned to summer signing Cavani at the break and could not have dreamed of a better outcome as he provided the assist for Fernandes before clinching victory with a brace.
Relive the match action on our LIVE blog!