Manchester United 2 Aston Villa 1
It came courtesy of a massive clanger by Villa goalkeeper Gabor Kiraly, ironically his side's hero earlier on when he made two brilliant first-half saves.
But with four minutes of stoppage time ticking away, Wayne Rooney released the Norwegian veteran with a glorious pass that found him on the right corner of the Villa box.
Solskjaer's low shot was on target, but seemed to pose little threat to Kiraly. But the Villa keeper let the shot go through his fingers, under his body and into the net.
Solskjaer, who wrote himself into United legend when he came off the bench to score their late winner against Bayern Munich in the 1999 Champions League final, had replaced debutant Henrik Larsson 12 minutes earlier.
The 35-year-old Swede, on a three-month loan from Helsinborgs, had created his own bit of United folklore in the 55th minute.
Ryan Giggs flicked on a Michael Carrick pass to Rooney on the left edge of the Villa penalty area. Rooney's pass inside found Larsson, who scored with a sweet 12-yard right-foot shot.
But Villa, who had soaked up United pressure well throughout, struck back 20 minutes later.
Gary Cahill's 25-yard drive found its way to Villa substitute Milan Baros 12 yards from goal and he rifled his low shot beyond United goalkeeper Tomasz Kuszczak and into the corner of the net.
United's winner was rough justice on Kiraly as he had made the first of two superb saves on the half-hour.
Cristiano Ronaldo's cross to the near post from the left found Rooney, who brilliantly turned Cahill on the corner of the six-yard box, only to see his shot superbly turned behind by Kiraly.
The Hungarian, on an emergency loan switch from Crystal Palace, pulled off another fine stop in the 38th minute. Carrick picked out Larsson with a pinpoint throughball, and the unmarked Swede tried to place his shot into the net from the edge of the box.
But Kiraly denied Larsson when he turned the ball behind with his legs.
United also came close after 58 minutes when Giggs clipped the Villa bar from a 25-yard free-kick.
Kuszczak was largely untroubled by Villa, although he produced one excellent stop in the 69th minute - a point-blank effort to deny Isaiah Osbourne.