Manchester United were destined to take all three points from West Ham after David de Gea pulled out a spectacular save from the penalty spot.
Man United opened the scoring in the first half, thanks to a Cristiano Ronaldo close-range effort.
Brahimi scored the equaliser before the half-time whistle.
Jesse Lingard, who replaced Paul Pogba late in the game, scored the match-winning goal for the Red Devils.
Just when many thought the game was over, West Ham won a penalty after a VAR review showed Luke Shaw handled the ball inside the penalty area.
David de Gea surprised the whole lot after saving the ball from entering the back of the net, with Noble receiving the shock.
West Ham 1-2 Man United.