Joel Byrom opened the scoring for the visitors and the League One side sensed a famous victory, only for England striker Defoe to level before the break.
Emmanuel Adebayor edged Spurs in front with a penalty before Defoe added his 15th goal of the season in the 75th minute to give eight-times FA Cup winners Tottenham a home quarter-final against Premier League strugglers Bolton.
Only two players remained from the team defeated by English champions Manchester United last time out but Spurs, third in the Premier League, appeared to have a strong-enough team to face lower-league opposition.
Tottenham boss Harry Redknapp also had Gareth Bale and Rafael van der Vaart returning from injury and Scott Parker back from suspension, with the trio of key senior players starting.
But within four minutes they were trailing after Byrom surged into the penalty area and went over on the challenge of New Zealand's Ryan Nelsen.
Spurs players protested that the ball would have gone out of play if Byrom stayed on his feet.
But referee Michael Oliver pointed to the spot and the Stevenage midfielder scored the penalty himself, sending Carlo Cudicini the wrong way.
It got worse for Spurs when Michael Dawson was carried off on a stretcher after appearing to injure his right knee, with Kyle Walker coming off the bench to replace him.
Stevenage were looking for a second goal and Jon Ashton headed just over from a free-kick in the 26th minute, only for Spurs to level seconds later.
Cudicini's punt down field found Defoe, who took a touch to speed away from Ashton and then drove into the bottom corner.
Defoe almost added a second goal just before the half-hour when Chris Day fumbled a cross from Aaron Lennon, but the goalkeeper was up sharply to block the shot.
It was Lennon's last action as he was taken off before the break with an apparent hamstring injury, and Adebayor was brought on.
Early in the second half, Italian shot-stopper Cudicini made a stunning close range save to deny Mark Roberts when the Stevenage captain found room from a corner and prodded towards goal with a left-footed effort.
But it was Roberts who conceded a key penalty nine minutes into the second period, tripping Bale on the right-hand side of the area before Adebayor stroked in the spot-kick.
Bale almost scored himself before the hour but his dipping drive crashed against the crossbar.
Stevenage refused to give up and Michael Bostwick forced a save from Cudicini with a drive, while Roberts hit the crossbar when he met a corner.
However, Defoe added his second goal of the evening when he ran onto Bale's huge throw and cut inside before finding the bottom corner.
Source: AFP
Source: AFP