United took an early lead through Mateusz Klich's second attempt at a penalty after a retake but Leeds conceded two goals from set pieces via headers from Tomas Soucek and Angelo Ogbonna as the Hammers moved up to fifth.
Graham Smyth, the YEP's chief football writer, hands out the scores.
7. Mateusz Klich
6 - Not at his best. Scored but needed two goes at the penalty. Couldn't find a way to break the Hammers down. Better in the first half than the second, seemed to fade. Photo by Jason Cairnduff - Pool/Getty Images.
8. Raphinha
7 - Bright and lively movement. Gave West Ham problems when he got in space. Sent in some nice crosses and corners. Photo by Oli Scarff - Pool/Getty Images.
9. Jack Harrison
5 - One lovely cross aside it wasn't a good first half from Harrison. Struggled on and off the ball, withdrawn at the break. Photo by JASON CAIRNDUFF/POOL/AFP via Getty Images.
10. Rodrigo
6 - Some nice stuff and some not so nice. Could have equalised. Creative in the first half, less of a force in the second. Photo by Gareth Copley/Getty Images.
11. Patrick Bamford
6 - A small number of chances came his way that he couldn't take. A frustrating night in which he couldn't dominate his markers. Won the penalty. Photo by Jason Cairnduff - Pool/Getty Images.
12. Helder Costa (sub)
5 - Looked keen to get on the ball and make things happen but it just didn't come, on either flank. Photo by Alex Pantling/Getty Images.