Crotone looked to be heading for a share of the spoils at the Ezio Scida stadium after Hugo Campagnaro's 82nd minute strike levelled the score after Raffaelle Palladino had given the hosts a 24th minute lead from the spot.
But Crotone restored their one-goal lead seconds later when Ferrari muscled his way past his marker to get to a free kick from the left and send a glancing header past Albano Bizzarri.
Crotone's third win of the season moved Davide Nicola's men up one place to third-from-bottom, one point ahead of Pescara and three ahead of basement side Palermo.
High-flying Lazio can move up to fourth place to within five points of leaders Juventus with a win at Sampdoria in Saturday's late game.
Juventus, who hold a four-point lead on both Roma and AC Milan, are away to Torino on Sunday.
Roma host AC Milan on Monday.