The League One leaders looked to be coasting but conceded two late goals in a three-minute spell.
Livingston moved in front after 14 minutes when Liam Buchanan raced through on Mark Hurst and calmly put the ball beyond the goalkeeper.
The equaliser came after 74 minutes when Jamie Insall headed home.
Scott Robinson, pictured, put East Fife in front after goalkeeper Liam Kelly’s clearance had bounced off him for what proved the winner.
Alloa Athletic maintained their challenge with a comfortable 4-2 win away at Stenhousemuir.
Alan Cook put Stenny in front with a terrific individual goal after nine minutes but a defensive lapse gave Kevin Cawley the easiest of equalisers.
Greig Spence put Alloa in the lead and Jordan Kirkpatrick made it 3-1 before half-time. Kirkpatrick added his second after 71 minutes to seal the win for Alloa.
Stenhousemuir finished the game with ten men after Alistair Roy, who had just come on as a substitute, had to be stretchered off. They managed a consolation goal when Oliver Shaw scored deep into injury-time.
Stranraer hoisted themselves off the bottom with a 1-0 win at Queen’s Park, with Willie Gibson netting his seventh goal of the season.