Rochdale, who had opened the scoring on the stroke of half-time, equalised when substitute Steve Davies scored from 12 yards in the third minute of stoppage time.
Tottenham will now travel to third-tier strugglers Rochdale for a FA Cup last-16 tie on the weekend of February 17-18.