Liverpool were leading 2-1 when, in the eighth minute of added time, Everton's James Tarkowski lashed a right-footed volley into the top corner of the Reds' net, sending the home crowd into raptures.
But Tarkowski - with almost the last kick of the game - gave Everton fans a thrilling moment to remember at Goodison, which hosted its first match in 1892, costing a mere £3,000 to build.
Liverpool were on track to cement their position at the top of the Premier League after Mohamed Salah's 73rd-minute goal appeared to have decided the 120th Merseyside derby in all competitions.
As fans spilled onto the pitch, Liverpool's Curtis Jones and Everton's Abdoulaye Doucoure scuffled in front of the visiting supporters.
Two players and two coaches were sent off as the final Merseyside derby at Goodison Park reached a frantic finale.