Felipe Anderson levelled early in the second half after a mistake from David De Gea but as West Ham went in search of a winner, Ryan Fredericks brought down Anthony Martial in the penalty area on 80 minutes and Pogba converted again to secure a 2-1 victory.
Manuel Pellegrini's team can feel aggrieved that they left Old Trafford with nothing -- particularly after Anderson had a goal wrongly ruled out for offside with the game still goalless.
United, meanwhile, will head to Barcelona on Tuesday on the back of a good result but a performance that was far from convincing.
The result. It was an uninspiring performance but sandwiched between two Champions League games, it was never going to be pretty. Before kickoff, Solskjaer said he wanted 15 points from the final six Premier League games to secure a top-four finish and now the target is down to 12. It was an important game in the context of the top-four race and United came through it. Just.
De Gea was culpable for the first goal in the league defeat at Wolves with a sloppy ball into midfield to Fred and he did the same here. His roll out to Pogba was always missing its target and 10 seconds later the ball was in the net courtesy of Anderson. De Gea is one of the world's best goalkeepers but this season mistakes have started to creep in -- although Solskjaer has insisted his concentration has not suffered because of his ongoing contract talks.
Manager rating out of 10
6 -- The Norwegian made five changes to his team. Two were enforced because of suspensions for Ashley Young and Luke Shaw but Marcus Rashford, Victor Lindelof and Scott McTominay were rested ahead of the return leg in Barcelona on Tuesday. It looked like it might backfire until Pogba scored his second penalty of the evening 10 minutes from time.
Player ratings (1-10; 10 = best. Players introduced after 70 minutes get no rating)
DF Diogo Dalot, 6 -- Lucky the linesman didn't spot him playing Anderson onside for West Ham's goal that never was in the first half. Didn't get forward as much as he would have liked.
DF Marcos Rojo, 6 -- His first start since December. Full-blooded challenge high up the pitch started the move that ended with United being awarded the first penalty but he was caught out at the back post for the equaliser.
DF Chris Smalling, 7 -- Had a good chance just before half-time from Mata's corner but couldn't get his header on target. Commanding in the air.
MF Fred, 8 -- Did well against Barcelona in midweek and was United's best player here. Looks far happier in a deeper role than when pushed further forward.
MF Paul Pogba, 7 -- Ditched his stuttered penalty run up and scored his 15th and 16th goals of the season with two penalties either side of half-time.
MF Juan Mata, 6 -- Won the penalty after being bundled over by Snodgrass and created a chance for Anthony Martial with wonderful bit of skill.
FW Anthony Martial, 5 -- Had the chance to stake his claim to start at Camp Nou but didn't take it. Barely looked interested until he won the second penalty.
FW Romelu Lukaku, 6 -- Feeding off scraps for much of the game but did drift out wide to put in a couple of dangerous crosses. Unlucky to be taken off.
FW Marcus Rashford, 7 -- Almost scored with his first touch.
MF Andreas Pereira, N/R -- Didn't do much in his 15 minutes on the pitch.
FW Mason Greenwood, N/R -- Made his third first-team appearance when coming on for Lukaku.