Tottenham struggled to break down the League One side for much of the match, but eventually took the lead through Townsend’s spot-kick after Jay McEveley’s handball.
Emmanuel Adebayor could have seen red early on after catching Louis Reed with a flailing arm, before missing Tottenham’s best chance of the first half after breaking free of the Sheffield United defence.
The side 45 places below Spurs in English football started superbly, and could have easily been playing against 10 men for the majority of the game after the early incident involving Adebayor, back in the Spurs team as captain.
The striker’s arm caught Reed in the face as the pair went in for a challenge in front of the Sheffield United bench, but referee Neil Swarbrick only gave a yellow card.
Jamal Campbell-Ryce’s fizzing cross-shot went just wide of Michel Vorm’s goal a few minutes later, before Eric Dier’s glancing header from a Townsend free-kick forced a good save out of Mark Howard.
Spurs then broke a resilient Blades back line with Christian Eriksen’s lofted ball, but Adebayor blazed the ball over the bar after a fine first touch inside the area.
At the other end, Sheffield United won possession high up the pitch after Ben Davies’ wayward pass, but Stefan Scougall’s fine effort from 20 yards was wayward.
Skipper Adebayor was brought off for the equally misfiring Roberto Soldado with 25 minutes remaining, and the Spaniard played a part in Spurs’ winner.
Soldado was found inside the area by a fine Eriksen lofted pass, before his first touch clipped the hand of McEveley at the byline.
Swarbrick pointed to the spot, and Townsend’s penalty had too much power for Howard in the Sheffield United goal down to the ‘keeper’s left.
The visitors kept pushing in a second half that produced few opportunities for either side, but lacked the clinical edge in the final third.
The two sides meet again in the second leg at Bramall Lane on Wednesday, January 28.
Tottenham: Vorm (6), Walker (6), Dier (6), Vertonghen (7), Davies (6); Townsend (7), Mason (6), Stambouli (6), Eriksen (7); Adebayor (5), Kane (7)
Subs: Dembele (6), Paulinho (6), Soldado (6)
Sheffield United: Howard (6), Flynn (7), Basham (7), McEveley (6), Harris (6), Campbell-Ryce (7), Doyle (6), Reed (6), Murphy (7), Scougall (7), McNulty (7)
Subs: Baxter (6), Wallace (6)
Man of the match: Jan Vertonghen