Soucek gave the Hammers a served first-half lead when United fell asleep from a corner, alllowing Declan Rice a free header to set up his team-mate.
United had been dire in the opening period, and at half-time Solskjaer hauled off Edinson Cavani and Donny van de Beek, bringing on Bruno Fernandes and Rashford.
The double substitution had the desired effect, with Rashford’s energetic performance stretching the Hammers and Fernandes involved in all of United’s goals.
First the midfielder set up Pogba’s equaliser on 65 minutes following a brilling Dean Henderson long ball.
The Portuguese star was also involved as Alex Telles set up Greenwood’s leveller moments later, and when Juan Mata played in Rashford for the third.
It was a classic game of two halves, with United much improved after the break as Fernandes showed just how important he is to the Red Devils.
Here’s how the Manchester United players rated at Upton Park
Manchester United player ratings vs West Ham – Premier League
Dean Henderson – 7
Made a good save from Pablo Fornals early on, and did enough to put off Sebastian Haller when the forward was clean through. Looked solid for the most part, and his brilliant long ball set up United’s equaliser
Aaron Wan Bissaka – 6
Had to recover well to prevent a second Hammers goal just before half-time after making a hash of his attempt to clear. More assured in the second half.
Victor Lindelof – 6
Made a last-ditch clearance in the first half – minutes after his botched clearance had given Sebastian Haller a gilt-edged chance to double West Ham’s lead.
Harry Maguire – 6
A wayward pass out of United’s box in the first half gave West Ham a half-chance before they took the lead. Far from his best as United’s defence struggled against the Hammers in the first half but like most of his team-mates he was better in the second.
Alex Telles – 6
Appeared to switch off for West Ham’s opener. Like the rest of his defensive colleagues he struggled to deal with the threat of Jarrod Bowen in the first half, but played a great ball into the box for Mason Greenwood to fire United ahead.
Scott McTominay – 5
Was lucky not to be the one hooked at half-time following a poor opening period, another who looked more assured after the break.
Paul Pogba – 6
Struck a fine equaliser just after the hour mark having posed little threat going forward in the first half. Got stuck in defensively and made a number of clearances from set-pieces.
Donny van de Beek – 5
Unable to impact the game and was hauled off at half-time with United desperately missing Bruno Fernandes.