Super sub Sam Vokes came off the bench to power home the header which gave the Clarets their best result of the season as they upset promotion favourites West Ham to make it three wins in a row for the first time since April.
Eddie Howe's men produced a heroic performance to come from behind for the second away game running and take maximum points.
Burnley have now won five times on the road already this season to bring the play-off places back into view.
But none have matched this for determination and character as they recovered from going behind to a Kevin Nolan goal after 52 minutes to beat a side that had won six of their last seven games and would have gone top of the table with a fifth straight success.
Captain Chris McCann quickly headed the visitors level and then with 15 minutes to go Vokes won it as Burnley's much maligned defence performed magnificently to keep the Hammers out and add real substance to the Clarets' climb up the table.
Burnley showed a real desire throughout the side, none more so than Londoner Dean Marney, who came in for his first Championship start since mid-September as Howe started with a midfield five to try and combat the high-flying Hammers.
Chris McCann heads the Clarets level
Marney sat in a deep-lying role to keep tabs on Nolan and while the Irons' skipper went close to getting on the end of a couple of things and the home side dominated possession early on, the Clarets defended stoutly to keep the home side at arm's length.
Lee Grant wasn't forced into a save in the opening exchanges with the nearest the Hammers came a header from Matty Taylor, under pressure from Kieran Trippier, which dropped wide from Julien Faubert's cross.
But just 60 seconds later Grant should have been picking the ball out of the net with a slip from Marney allowing Carlton Cole to cross low for Nolan to direct the ball wide off the target, albeit at full stretch, from less than six yards out with almost half an hour gone.
Going forward it was a virtual non-event for the Clarets before the break as Jay Rodriguez was left an isolated figure in front of a midfield intent on not over-committing, despite the efforts of McCann to try and offer some support.
All together now after Sam Vokes bags the winner
Keith Treacy sent one long-range effort into the side-netting but it was never likely to worry Rob Green, who barely touched the ball in anger as Burnley dug in and reached half-time with their game plan still intact.
It wasn't to last for long though, as seven minutes into the second half the Hammers' pressure paid off as Cole flicked on for Nolan to get in behind the Burnley defence and lift a shot over Grant from 20 yards to break the deadlock.
With the Clarets now needing to take the initiative, Howe wasted no time in preparing to make a double change with Sam Vokes and Ross Wallace prepared to come on.
But within moments Vokes was sitting down again as McCann made it 1-1 as the Hammers' lead lasted just five minutes.
Junior Stanislas had made a quiet return to his former club but when he got the chance to cross after the Clarets had worked a throw-in routine, he delivered perfectly for McCann to leap and head home the equaliser.
Jumping for joy
Suddenly the game was opened right up and it took a remarkable block from Trippier to stop Frederic Piquionne volleying West Ham back in front with his first touch after coming off the bench.
And the Clarets gave everything to try and make sure they returned with some reward as Marney then got a vital touch on a Jack Collison shot to divert the ball against the foot of a post.
It wasn't just a rearguard action, though, as Burnley looked more threatening on the break as Wallace fizzed a first-time volley wide from Green's clearance and Jay Rodriguez then had the England international scrambling to save his near 40-yarder.
Green was relieved to palm that effort over the bar but it proved to be a short-lived reprieve as the Clarets struck from the corner to go 2-1 up.
Vokes had been forced to bide his time to get a taste of the action but it was it worth the wait as he arrived perfectly to bullet home a header from Wallace's delivery.
Leading from the front
Sam Allardyce's response was to throw on John Carew to add even more height and power to the Hammers' attack and with seven minutes to go Cole hit the outside of a post with a shot from the edge of the penalty area.
But the Clarets defended for their lives and with total commitment to the cause they held out for a famous win as only the second Burnley team in 50 years to leave Upton Park with maximum points.
Burnley: Grant, Trippier, Mee, Duff, Edgar, Bartley, McCann, Marney, Stanislas (Vokes 69), Rodriguez, Treacy (Wallace 58). Subs: Easton, Hines, Wallace, Stewart.
Booked: Duff 66, McCann 66, Vokes 90
West Ham: Green, O'Brien (Carew 80)McCartney, Tomkins, Faye, Faubert, Collison, Taylor (Piquionne 56), Nolan, Noble, Cole. Subs: Carew, Demel, Diop, Stech.
Referee: Fred Graham