It looked as though substitute Harry Kane's late penalty had put Tottenham into the quarter-finals but fellow substitute Davies fired home to provoke joyous scenes at Spotland.
Rochdale, bottom of League One, can now look forward to a money-spinning replay at Tottenham's temporary Wembley home.
The lively Ian Henderson swept home on the stroke of halftime to give Rochdale a deserved led -- his sixth goal in this season's competition.
Tottenham, who also needed a replay to get past fourth-tier Newport in the previous round, dominated the second half and Lucas Moura, making his first start since joining from Paris St Germain in January, equalised on the hour.
The winners will face either Swansea City or Sheffield Wednesday in the quarter-finals.
(Reporting by Reuters.)