The Irons went ahead the 34th minute but in extremely controversial fashion as Manuel Lanzini converted from a goalmouth scramble but only after a crucial intervention from Jarrod Bowen who had been in an offside position.
The goal stood despite a lengthy check from VAR and both sides then squandered some fine chances to add to the scoring before the Hammers finally put Leeds away deep in second half stoppage time as Bowen finished off an Irons counter attack.
Whites head coach Marcelo Bielsa was without nine players due to injuries - including the still absent Patrick Bamford - and the Argentine gave debuts to youngsters Leo Hjelde and Lewis Bate plus a first start to Sam Greenwood.
Graham Smyth, the YEP's chief football writer, hands out the scores.

13. Raphinha (sub)
5 - Leeds needed him to produce some magic and although he sought the ball, little he tried came off. Couldn't get into it in areas to hurt West Ham. Photo by Robbie Jay Barratt - AMA/Getty Images.

14. Adam Forshaw (sub)
5 - Didn't make much of an impact in his 30 minutes on the pitch. Tried to give his side a platform but West Ham were still able to control things for the most part. Photo by George Wood/Getty Images.

15. Cody Drameh (sub)
6 - Harshly booked. Got forward and tried to make something happen on the right. Made a couple of nice runs. Photo by Stu Forster/Getty Images.

16. Crysencio Summerville (sub)
6 - Bright and lively without producing at the end of his runs or dribbles. Got stuck in at least. Photo by James Williamson - AMA/Getty Images.

17. Stuart Attwell (referee)
3 - Missed a lot, gave free-kicks that weren't fouls, flashed his yellow card harshly and appeared to miss an offside in the lead up to the first goal. But so did VAR after multiple replays. Photo by Craig Mercer/MB Media/Getty Images.