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.

7. Lewis Bate
6 - Busy, industrious but unable to give Leeds control. A couple of nice moments, pressed well and showed aggression. Photo by Sebastian Frej/MB Media/Getty Images.

8. Mateusz Klich
6 - The usual work-rate, a nice pass or two but West Ham controlled the middle of the park comfortably. Photo by Robbie Jay Barratt - AMA/Getty Images.

9. Jack Harrison
5 - Couldn't bring the momentum from the Burnley game into this one. Kept trying but ran into trouble too often. Photo by Robbie Jay Barratt - AMA/Getty Images.

10. Dan James
5 - Unable to make much happen. Showed his pace but didn't pick the right options or deliver the right ball from positions he got into. Photo by Mike Hewitt/Getty Images.

11. Sam Greenwood
6 - Lots of energy, had the confidence to try his luck from distance but couldn't produce a moment of magic and largely had to feed off scraps. Photo by Mike Hewitt/Getty Images.

12. Stuart Dallas (sub)
6 - Tried to get forward and keep Leeds on the front foot but was unable to change the game or prevent West Ham from bursting forward. Photo by Robbie Jay Barratt - AMA/Getty Images.