Playing in front of the Stretford End for the first-time, Cavani produced a majestic 40-yard lob to give United the lead on 15 minutes.
It was a truly spine tingling moment when the ball soared over Alphonse Areola's head, sending supporters into an audible frenzy as Cavani sprinted and slid to greet them.
The result ensures United finish second in the Premier League with one game remaining.
But with the Europa League final next Wednesday, Solskjaer was hoping to build momentum with a confidence boosting win against the Cottagers.
"We wanted to win," the Norwegian said. "Not because of second or third position – we wanted to gain momentum, gain confidence, because we've lost too many points in the last week.
"Hopefully that won't dent the confidence. Hopefully it will just wake them up. We made too many decisions that I didn't like."