A brace of penalties from Paul Pogba – either side of Felipe Anderson’s leveller – lifted United above Arsenal and into fifth in the Premier League table, two points behind fourth-placed Chelsea.
However, Hammers boss Manuel Pellegrini questioned the awarding of both spot-kicks and rued Anderson having a goal incorrectly ruled out for offside when the score was goalless.
Solskjaer, who made five changes to his line-up ahead of the return leg of their Champions League quarter-final in Barcelona on Tuesday, did not speak about the questionable decisions.
But he said afterwards: “Sometimes you get more than what you deserve and today was one of those nights.
“We were lucky it wasn’t Barcelona on the other side, but West Ham played well, played better than us, created chances.
“It evens itself out in the long run. We were lucky to get away with the three points – even a draw at one point I would have taken.
“You can go through all sorts, but (the 1-0 defeat to Barcelona in midweek) was hard, physically, mentally.
“We have a game on Tuesday so I had to make a couple of decisions. I didn’t make it easy for the boys because I made changes.
“Two were forced, the full-backs (Luke Shaw and Ashley Young) were suspended. Scott (McTominay) was fantastic in midweek but we needed a big performance from him again and I didn’t think mentally he was ready. (Marcus Rashford) was not 100 percent ready.”
Solskjaer feels the Champions League scheduling did his side no favours.
He added: “I don’t understand that. Someone needs to explain to me why Wednesday night then becomes a Tuesday night in the Champions League the next week.
“The other teams played Tuesday night and then have Wednesday night, one day extra before and one day extra after.
“That’s a strange one. We tried to Google it but we couldn’t. That’s a strange decision and of course that would have made it different for us, I wouldn’t have made so many changes.”
Diogo Dalot’s trailing leg looked to play Anderson onside before the Brazilian rifled past David De Gea.
But the offside flag came to United’s rescue and it was the hosts who went ahead in the 19th minute through Pogba’s 19th-minute spot-kick, given despite seemingly minimal contact from Robert Snodgrass on Juan Mata just inside the area.
Anderson levelled with a sliding finish four minutes after the resumption, while substitute Michail Antonio rattled the bar before his downward header was clawed away by David De Gea as West Ham looked for a winner.
Hammers boss Pellegrini felt Anthony Martial was offside as he ran through on goal before being upended inside the box by Ryan Fredericks.
Pogba, who eschewed his stuttering run-up in favour of a more traditional approach with both his penalties, netted the resulting spot-kick.
Pellegrini acknowledged the decisions that went in favour of United were close calls for referee Graham Scott and his assistants.
He said: “I’m frustrated of course because I think we deserved more. It was a pleasure to see the team playing the way we did against Manchester United in their own stadium.
“Unfortunately for us there were some decisions, they were very difficult so I am not complaining about him.
“But with VAR, I am sure we would win the game 1-0. Felipe Anderson was onside. It was not a penalty from Robert. The last goal from Man United was offside, the last pass. A few mistakes but the decisions went for United.”