Marcelo Bielsa's side went ahead in the tenth minute as Harrison finished off a fine move after Mateusz Klich's attempt had been saved.
The Whites then lost both Adam Forshaw and Junior Firpo to injury around the quarter mark and the Irons drew level 11 minutes before the break when Jarrod Bowen headed home a corner.
United went back ahead just three minutes later as Harrison doubled his tally by netting from close range from a Raphinha corner.
The Irons levelled for a second time in the 52nd minute as Michail Antonio's flick released Pablo Fornals who cut inside and beat Illan Meslier with a low finish.
Yet Leeds went back ahead on the hour mark as Harrison completed a superb hat-trick when slotting home after Raphinha's through ball.
The Whites were then denied a fourth as Klich's strike was disallowed by VAR for offside after hitting Rodrigo practically on the line but Harrison's treble was enough for a memorable success.
Graham Smyth, the YEP's chief football writer, hands out the scores from a memorable afternoon at the London Stadium.

. Jack Harrison hit a hat-trick as Leeds United recorded a thrilling 3-2 success at West Ham.
TREBLE TONIC: Jack Harrison fires past West Ham United 'keeper Lukasz Fabianski to complete his Leeds United hat-trick. Photo by Mike Hewitt/Getty Images.

. Illan Meslier
7 - Some important interventions when he was needed. Could do little about either goal. Photo by DANIEL LEAL/AFP via Getty Images.

. Stuart Dallas
8 - Another who had moments he'd like to do better in but put a foot in so many times at big moments. Photo by Marc Atkins/Getty Images.

. Luke Ayling
7 - Stormed back from a wobbly period and with the bit between his teeth drove Leeds forward. Found it hard going defensively at times but dug in. Photo by Marc Atkins/Getty Images.

1. Illan Meslier
7 - Some important interventions when he was needed. Could do little about either goal. Photo by DANIEL LEAL/AFP via Getty Images.

2. Stuart Dallas
8 - Another who had moments he'd like to do better in but put a foot in so many times at big moments. Photo by Marc Atkins/Getty Images.

3. Luke Ayling
7 - Stormed back from a wobbly period and with the bit between his teeth drove Leeds forward. Found it hard going defensively at times but dug in. Photo by Marc Atkins/Getty Images.

4. Pascal Struijk
8 - A terrific performance. Antonio got the better of him a few times but Struijk more than held his own. Back with a bang. Photo by Mike Hewitt/Getty Images.

5. Junior Firpo
7 - Was playing well enough when his hamstring went. Hugely disappointing for Leeds to see him limping off having only just returned. Photo by Craig Mercer/MB Media/Getty Images.

6. Robin Koch
8 - Solid. Played some nice stuff, got about the pitch. Couldn't completely control the midfield but gave Leeds a vital presence. Photo by Mike Hewitt/Getty Images.