David Moyes’ side now have four wins in their last five games as a late goal from Angelo Ogbonna secured a vital three points in Yorkshire.
The home side were the quickest out of the traps in the opening stages as midfielder Matheusz Klich put from in front after four minutes.
Lukasz Fabianski tangled with Patrick Bamford to concede a rash spot kick and despite saving Klich first penalty.
Referee Michael Oliver penalised the Polish international for straying off his line and Klich confidently tucked home his second attempt.
That early goal opened the game up in the first half hour, with both keepers called into rapid action, before Tomas Soucek deservedly nodded West Ham level.
Jarrod Bowen swung a deep corner into far post and Soucek was too hot to handle in the box as he stooped to head past Illan Meslier.
That goal boosted the visitors confidence after the restart as Meslier bravely saved from Sebastien Haller.
Both sides did create chances to win it the final stages, but West Ham’s set piece power proved the difference again as Ogbonna headed home the winner.
Aaron Cresswell whipped free kick found the Italian in space inside Leeds’ box and he emphatically powered past Meslier.
Full Time at Elland Road it’s Leeds United 1 West Ham 2