The Frenchman converted after Robert Snodgrass was deemed to have fouled Juan Mata in the first half and when Ryan Fredericks brought down Anthony Martial in the 80th minute.
But West Ham were the better side for large parts of the contest.
They should have taken the lead in the ninth minute when Felipe Anderson’s effort was incorrectly ruled out for offside, before the Brazilian deservedly equalised shortly after half-time by converting Manuel Lanzini’s cross at the back post.
With the score at 1-1, Michail Antonio smashed a shot from the edge of the box off the crossbar and had a header excellently saved by David de Gea.
The win sees United, who had lost their last two games, climb to fifth, two points behind fourth-placed Chelsea who play Liverpool on Sunday.
Fortune favours Man Utd in important win
With the second leg of their Champions League quarter-final against Barcelona to come on Tuesday, United manager Ole Gunnar Solskjaer made five changes to his team and for much of the game they lacked fluidity, giving the ball away repeatedly in the first half in particular.
The hosts were lucky not to go behind early on when replays showed Diogo Dalot played Anderson onside and there was also contention around the awarding of United’s first penalty.
Snodgrass rushed back to prevent Mata shooting from the edge of the penalty area and did not get to the ball with his challenge. But there was to be little contact with the Spaniard either, who appeared to kick his own heel as he went down.
West Ham were the better side in the first half and overcame a good United spell following the introduction of Marcus Rashford, to shade the second.
Had Antonio put away either of his chances, which came within minutes of him being sent on from the bench, then not many would have argued the Hammers had not deserved to lead.
But there was little doubt about United’s second penalty, when Martial got in behind the defence and Fredericks brought him down when making a last-ditch attempt to deny the Frenchman a shot.
Pogba calmly converted, as he had done with the first, to ensure United won for just the second time in their past six games.
West Ham’s good work to no avail
West Ham’s inconsistency has held them back this season with wins over Manchester United and Arsenal earlier in the season often followed by poor performances like those in their three defeats in their past four games.
At Old Trafford on Saturday they impressed with Declan Rice excellent in midfield and Anderson and Lanzini threatening in attack.
Lanzini, who has been restricted to just six starts this season due to injury, went off with what appeared to be a groin problem in the second half but the introduction of Antonio almost immediately paid off.
Manager Manuel Pellegrini furiously protested at the disallowed goal and the penalty decision in the first half and his side, who are in 11th place with 42 points, were unfortunate.
He must, however, take pride in the performance despite a third successive defeat.
Man of the match – Paul Pogba (Manchester United)
‘We got away with it’ – manager reaction
Manchester United manager Ole Gunnar Solskjaer, speaking to BBC Sport: “They played better than us, it is fair to say, I don’t think anyone will disagree. We got away with it. Sometimes we have lost when we should have won, so over a season it evens itself out.
“Playing on Wednesday, and today and again on Tuesday played a major factor. It’s a juggling act and we got away with it today.
“You’re allowed to have a good keeper, he [David de Gea] is a fantastic keeper. If they score [at 1-1] they could have gone on to win.
“We got away with it, [it’s] got three points. In a few years no-one will remember how we played if we finished in the top four.”
Pogba’s best season – the key stats
- Manchester United are unbeaten in 14 Premier League home games (W9 D5) since a 3-0 loss against Spurs in August. Only Liverpool (37) and Arsenal (16) are currently on longer unbeaten runs at home in the competition.
- West Ham are winless in their last eight Premier League away games (D1 L7), losing the last four in a row.
- United are unbeaten in their last 11 Premier League home games against West Ham – among current Premier League sides, they are only currently on a longer such run against Arsenal (12).
- United have won a league-high 12 Premier League penalties this season. Indeed, it’s also the most the Red Devils have ever taken in a single campaign in the competition.
- West Ham had 18 shots in this match, their most in a Premier League away game since December 2016 (24 vs Leicester).
- Paul Pogba has scored seven Premier League penalties this season – only Ruud van Nistelrooy in 2002-03 (8) has scored more from the spot for United in a single season.
- Pogba has been directly involved in 22 Premier League goals this season (13 goals, 9 assists), his best return in a single campaign in the top five European leagues.
- Felipe Anderson scored his first Premier League goal in 14 games, becoming the first West Ham player to score home and away against United in the same league season since Jermain Defoe in 2001-02.
Their next league game is away against Everton on Sunday, 21 April at 13:30.
West Ham host Leicester in their next game on Saturday, 20 April (kick-off 15:00).
- 1de Gea
- 16RojoSubstituted forPereiraat 75′minutes
- 8MataBooked at 34minsSubstituted forRashfordat 55′minutes
- 9LukakuSubstituted forGreenwoodat 75′minutes
- 5ZabaletaSubstituted forFredericksat 76′minutesBooked at 79mins
- 8Felipe Anderson
- 10LanziniSubstituted forDianganaat 62′minutes
- 17HernándezSubstituted forAntonioat 73′minutes
- Graham Scott
- Shots on Target
Delay over. They are ready to continue.