The Whites, who are 16th, remain five points ahead of the Toffees but their distance to the 18th-placed Clarets is now six points. Both sides immediately below Jesse Marsch’s side have played two games fewer.
Maxwel Cornet struck five minutes from time to give Burnley the potentially-vital win in a frantic match which swung from end to end. Burnley had taken an early lead through Nathan Collins’s first goal for the club but then fell behind as Richarlison twice scored from the penalty spot before the break.
And the game swung again in the second half as Jay Rodriguez levelled in the 56th minute before Cornet’s first goal since his return from the Africa Cup of Nations in January gave Burnley their first win in six games, moving them to within a point of Everton in 17th place.
A soaked and dejected Frank Lampard trudged off the pitch at full-time, his side now having lost six-straight games away from home in the league, sucked ever deeper into trouble.
Burnley had lost their last four without scoring a goal, being urged unceremoniously by Sean Dyche to simply “kick it in the goal”, and the manager chose an attacking side as Rodriguez came in and Cornet replaced Dwight McNeil on the left.
Both managers had sought to downplay the idea of this as a relegation decider but there was a real sense of tension inside Turf Moor at kick-off.
Burnley were first to feed on that, with Charlie Taylor and Ashley Westwood both threatening before Collins broke the deadlock with 12 minutes gone. Ashley Westwood then fouled Anthony Gordon inside the penalty area as Richarlison stepped up to send goalkeeper Nick Pope went the wrong way.
Just before half time, Vitaliy Mykolenko was caught by Aaron Lennon in the box and after a consultation with the on-field VAR monitor, Mike Dean awarded a second penalty. Richarlison stepped up and again sent Pope the wrong way.
Burnley drew level 11 minutes after the restart as Rodriguez hammered home from close range. Then, five minutes from time, Cornet completed the turnaround, sparking wild celebrations.