Peter Crouch had fired Spurs ahead but Beckford replied after the break before winning and scoring his stoppage-time spot-kick after Roman Pavlyuchenko looked to have earned Spurs a win at White Hart Lane.
Getting back to the top of League One may be the priority for Simon Grayson's men with Norwich overtaking them earlier in the day, but the cup is providing a wonderful distraction and they will be encouraged by another battling performance and their goalkeeper being in top form.
The first half was simply a case of whether Spurs could find a way past Ankergren, a week after Hull's Boaz Myhill single-handedly denied them victory with a goalkeeper masterclass.
Ankergren's performance came against a strong Spurs line-up with only Vedran Corluka rested and youngster Danny Rose given a chance to impress against his former club in his first start for his new club.
Rose's selection can be interpreted as a blow for David Bentley. Spurs boss Harry Redknapp hinted at the midfielder lacking effort in training on the eve of the match, he was not included in the matchday squad and did not watch from the bench like injured team-mates Aaron Lennon and Tom Huddlestone.
They watched Spurs apply heavy pressure in the opening stages and it needed Ankergren to be at his best.
The Danish stopper was first required to tip over the crossbar from Defoe when the England striker latched on to Michael Dawson's clearance and took the ball around Leigh Bromby with his head.
Then Niko Kranjcar was denied when Ankergren parried his long-range drive - but there was more to come from the Leeds number one after Rose was fouled by Michael Doyle in the penalty area, a clumsy challenge from the defender.
Defoe took the spot-kick and Ankergren leapt to his left to make a one-handed save.
Ankergren also stopped a free-kick from Gareth Bale, and even when he fumbled a Kranjcar set-piece, Patrick Kisnorbo scrambled it clear with a brave block.
Spurs felt they should have had a second penalty when Defoe raced through and Jason Crowe brought him down, with Alan Wiley deciding the defender played the ball.
With Ankergren to thank for keeping the scores level - and Wiley's decision - Leeds then threatened to open the scoring at the other end. Robert Snodgrass made a yard of room on the edge of the area and his curling effort stretched Heurelho Gomes.
Beckford had an even better chance on the half-hour mark, using his body to turn Dawson but flashing his left-footed finish wide of the target.
Three minutes later he got one on target, after Snodgrass looped a ball over for him, with Gomes required to block his powerful volley.
Crouch made Leeds pay for their wastefulness when he struck three minutes before the break. The move started when Bale beat Jonathan Howson on the left and pulled the ball back for Kranjcar.
Inevitably, after his stunning first half, Ankergren saved but the ball fell for Crouch to tap in.
Jermaine Jenas presented a glorious opportunity to Leeds in the first minute of the second half with a sloppy backpass but Beckford's touch was too heavy when he tried to take the ball around Gomes.
But the 26-year-old made no mistake with his next chance. Bromby flicked on Snodgrass' corner and Jenas should have cleared, allowing Beckford to prod over the line.
It was his 21st of the season and another reason why Premier League clubs have been looking to sign him next season when his contract at Elland Road runs out.
It added to the cracking cup-tie atmosphere - and chances kept being created. Sebastien Bassong headed straight at Ankergren, then Snodgrass went wide at the other end.
Redknapp's response was to take off Crouch and Kranjcar for Robbie Keane and Pavlyuchenko, with the Russian scoring with his first chance.
Wilson Palacios shifted the ball inside, Pavlyuchenko dummied and Defoe sent the ball through for him to slot past Ankergren.
But there was a final twist, with Dawson fouling Beckford in the penalty area with stoppage-time running out and the Leeds player smashed home the penalty.