- Don't have ESPN? Get instant access
But Marcelo Bielsa's Leeds, missing seven players through injury or suspension, had other ideas.
Harrison opened the scoring after 10 minutes with a pinpoint finish but Jarrod Bowen equalised with a header in the 34th minute -- his fourth goal in his last three games.
Harrison touched in from close range three minutes later to give Leeds the half-time lead.
When Pablo Fornals levelled again with a precise finish seven minutes after the break it seemed West Ham would go and win but Leeds responded in magnificent fashion.
Harrison's deft finish after dazzling play by Raphinha restored their lead and Raphinha rattled the woodwork with a superb free kick before Leeds had an effort by Mateusz Klich ruled out for a harsh offside.
The win lifted Leeds to 15th, nine points above the relegation zone.
West Ham remained fourth with 37 points but the three sides below them -- Arsenal (35), Tottenham (33) and Manchester United (32) all have at least two games in hand.
"We have got this far and doing really well. We are still in the top four at the minute," West Ham's Declan Rice said. "This was a big chance to close the gap on Chelsea in second, but that is football. It is about how you bounce back."
They started superbly and took the lead when a shot was parried by Lukasz Fabianski but Forshaw teed up Harrison who shot left-footed into the corner.
Bowen, on target when West Ham beat Leeds in the FA Cup last week, was given far too much space to equalise but West Ham always looked vulnerable to the slick attacking of the visitors, for whom Raphinha was outstanding.
Harrison made it 2-1 when he nudged in Luke Ayling's goalbound header.
Leeds's desire to play from the back caught them out in the 52nd minute when Ayling's pass was intercepted and Fornals cut in from the right to score past Illan Meslier.
West Ham were guilty of carelessly giving the ball away on the hour and were punished as Raphinha threaded a pass to Harrison who dinked a deft finish over Fabianski.
Leeds were denied a fourth when more skill by Raphinha saw Klich fire home but his shot brushed off Rodrigo who was on the goalline and deemed to be offside.
Andriy Yarmolenko had a goal ruled out for West Ham for offside and Bowen wasted a last-gasp chance.