The Red Devils have not enjoyed an away victory since February and have won only two of their last eleven games in the Premier League.
Andriy Yarmolenko secured the lead for the hosts with a goal right before the interval, and Aaron Cresswell converted a fine 25-yard free-kick six minutes from time to help the Hammers to their fourth win in 21 games against the league's top six clubs.
Manchester United, who were already without Anthony Martial and Mason Greenwood, ended the game without a regular striker as Marcus Rashford was forced off with a groin problem in the second half.
Rashford's injury adds to the growing crisis at Old Trafford as the likes of Paul Pogba, Luke Shaw and Eric Bailly are also out due to injuries.
Speaking after the game, Solskjaer told reporters,
"We lost here last year, it's always a difficult ground to go to and we hoped to do better than we did. We hope for better.
"But the key moments they grasped and we didn't. I have to say, two fantastic finishes from two left feet. We just didn't take the chances when we had them.
"Of course, when you lose a game you're disappointed. It's a game that can go both ways, as you expect away from home in the Premier League.
"It's a good group to work with, they're determined. Sometimes along the road you hit some bumps, some highs and lows, this group is determined and they have desire. It's a good atmosphere in the dressing room and they've got their focus right."
A win for Manchester United would have helped them move to third place in the league table, but the loss leaves them at eighth place, while West Ham are fifth in the standings.
Here are some Twitter reactions to the game: