Jay Rodriguez proved himself a man for all seasons with a historic goal for the Clarets to keep them in the hunt for Europe.
Rodriguez became the first Burnley player to score in all 12 calendar months as he added to his winning goal in June against Watford with another here.
The Clarets’ striker skilfully steered home a 38th-minute header which took him into double figures for the season.
And a second successive away win – and record-equalling 14th of a Premier League season – made it another special night as Sean Dyche’s men climbed up to ninth place in the table and just two points behind Arsenal in seventh spot.
Nick Pope also got to 14 for the season, an inspired performance stretching his lead in the pursuit of the golden glove for the most clean sheets in the top tier.
And on a night of superb performances which extended the Clarets’ unbeaten run to four games – and one loss in 12 – none could have given more than Kevin Long, Josh Brownhill and Erik Pieters, who might not have played but for lockdown and have all helped Burnley take their season into a thrilling spell of extra time.
The Clarets were unchanged for their second trip to London in little over a week and the first of four more games in an 11-day period which promised to determine their prospects of keeping alive a European challenge.
West Ham – who brought Andriy Yarmolenko into their starting line-up – were more concerned about the other end of the table and their place just above the relegation zone.
Their plight had been eased by beating Chelsea last time out at the London Stadium, which looked even more vast with no supporters inside to fill the wide-open spaces.
But they were second best early on in a bright start from the Clarets who might have led inside the first 10 minutes when Matej Vydra did well to hold onto a cross from Charlie Taylor before teeing up a shot from Pieters the Dutchman lifted over the top.
Vydra also glanced a header into the arms of Hammers keeper Lukasz Fabianski from a Dwight McNeil free-kick as the visitors moved the ball about impressively.
But West Ham were to enjoy a spell of dominance themselves and the Clarets were indebted to a couple of fine saves from Pope and timely blocks from the central defensive pairing of James Tarkowski and Kevin Long to stay level.
Pope’s close-range block from Tomas Soucek was the best, although he also had to be alert to block with his legs from dangerman Michail Antonio.
And having kept the Hammers at bay, Burnley then grabbed the lead seven minutes before the break.
Taylor’s forays forward in tandem with Dwight McNeil had been one of the Clarets’ best attacking options and when Taylor swung in a magnificent cross, Rodriguez timed his run perfectly to flick a header across Fabianski and in off the underside of the bar to gain his piece of club history.
There was an immediate reprieve at the other end as Antonio caught the Clarets napping and should have slotted home the equaliser instead of steering a shot the wrong side of the post.
But Burnley also had time to squeeze in one more chance before half-time with Pieters neatly lifting the ball over the Hammers’ defence for Vydra to mis-cue on the volley.
The Clarets maintained the momentum after the break with another up-beat start and with half an hour to go, as the heavens opened over east London, Dyche sent on Chris Wood for the tiring Vydra.
Wood’s six goals in five top-flight appearances against the Hammers gave him the perfect course and distance form and when another Taylor cross dropped at his feet he wasn’t far off adding to his tally with an instinctive effort that went too close to Fabianski.
The Hammers had also made a change with record signing Sebastien Haller coming on and the French almost made an immediate impact of his own.
Once again, though, Pope proved unpassable with another smart block with his legs to keep out the striker’s shot.
With 15 minutes to go the Clarets briefly thought they had given themselves some breathing when Wood slid in to convert a low cross from Phil Bardsley before the offside flag curtailed any celebrations.
And when Wood stretched the Hammers’ defence again from Taylor’s ball in behind the Londoners’ defence, it took a decent save from Fabianski diving low to his left to prevent the Kiwi from adding to his tally as the clock began to run down.
The Clarets still had defending to do but with Pope grabbing everything in the air and those in front of him putting their bodies on the line, Dyche’s men secured a fourth double of the season – another Premier League best in what could be another landmark season.
West Ham: Fabianski; Fredericks, Diop, Ogbonna, Cresswell; Soucek, Rice; Yarmolenko (Haller 62), Bowen, Fornals (Ajeti 86); Antonio. Substitutes: Randolph, Balbuena, Lanzini, Noble, Wilshere, Masuaka, Johnson.
Burnley: Pope; Bardsley, Long, Tarkowski, Taylor; Pieters, Westwood, Brownhill, McNeil; Rodriguez, Vydra (Wood 58). Substitutes: Peacock-Farrell, Gudmundsson, Brady, Thompson, Dunne, Benson, Goodridge, Glennon.
Referee: Michael Oliver