(AFP) - Tottenham looked to be heading out of the tournament after Marcin Wasilewski and substitute Shinji Okazaki struck to put Leicester 2-1 up at White Hart Lane, Christian Eriksen having earlier opened the scoring.
But with two minutes remaining, Leicester winger Nathan Dyer was penalised for handball and Harry Kane, who had come on in the 68th minute, slammed home the ensuing penalty to keep Spurs in the cup.
The teams resume hostilities in the Premier League on Wednesday, when fourth-placed Spurs host second-placed Leicester.
"Today is a good example of not giving up and fighting," said Spurs manager Mauricio Pochettino.
"We feel disappointed, but that is football and we have the opportunity to go to Leicester and still be in the next round."