By Rob Bishop
Christian Benteke pounced with a dramatic last-minute winner at a packed County Ground to send Villa into the Capital One Cup quarter-finals.
With just 18 seconds of normal time remaining, the Belgium striker emphatically drove home Eric Lichaj's cross to seal a victory just when extra-time looked inevitable.
It was certainly a huge relief for Paul Lambert's men, who had surrendered a two-goal interval lead established by Benteke's 30th-minute header and a stunning Gabby Agbonlahor strike nine minutes later.
If Villa looked home and dry at the break, it was a vastly different story as Paolo Di Canio's impressive League One outfit gained momentum in the second half, culminating in quick-fire goals from sub Miles Storey.
Villa's cause wasn't helped by the fact they had to reorganise at the back when Chris Herd limped off just after the opening goal.
Sub Enda Stevens slotted in at left-back while Lichaj switched to the right and Matt Lowton moved inside to partner Ron Vlaar in central defence.
Villa experienced a few anxious moments before taking the lead.
Shay Given had to race out to save at Paul Benson's feet, while the 19-minute applause for Stiliyan Petrov was almost punctuated by former Villa youngster James Collins, who found space on the left to unleash a fierce angled drive which flew just beyond the far post.
Then Karim El Ahmadi's misplaced pass put his team-mates in trouble as Collins collected the loose ball and threaded a fine pass through to Benson.
Full credit to El Ahmadi, though, the Morocco international racing back to make amends for his error by dispossessing the Robins striker.
Lowton came to the rescue on 26 minutes, clearing Benson's powerful shot off the line, and it looked bleak for the visitors when Herd went down injured just before the half hour mark.
Even before he had been replaced by Stevens, however, Villa were ahead with a clinically executed goal.
Lichaj's pass released Stephen Ireland down the left and Benteke muscled his way into a good position to leave keeper Wes Foderingham helpless with an unstoppable close-range header.
If that was a well-worked goal, the second was even better.
Ireland was again instrumental, his pass being controlled by Agbonlahor, who cut inside his marker and let fly with a stunning 20-yard drive which flew inside the left-hand post.
There might have been a third goal before the interval, too, Andreas Weimann meeting Lichaj's cross from the right with a perfectly-struck volley which Foderingham acrobatically turned away for a corner.
Villa endured a uncomfortable spell immediately after the break, Benson just failing to connect with Matt Ritchie's inviting low cross before Gary Roberts headed over a Collins centre.
Villa gradually settled again, with Barry Bannan unlucky to see a low drive deflect off Simon Ferry for a corner while Benteke forced Foderingham into a good save.
In between those two efforts, though, Roberts should really have reduced the deficit, the midfielder somehow heading wide at the far post from Ritchie's right-wing centre.
The home side finally pulled a goal back when Storey converted Ritchie's 79th-minute low cross at the near post - and two minutes later it was all square when the unmarked Storey cheekily back-heeled home from seven yards after Tommy Miller had volleyed across the goalmouth.
But Villa were not finished, and after Weimann had smacked a shot against the post, Benteke hit his late winner, controlling Lichaj's cross from the right before drilling a low shot into the bottom corner.
Swindon: Foderingham; Devera, Flint, McCormack, McEveley; Ritchie, Ferry, Miller, Roberts (De Vita, 69); Benson (Williams, 50), Collins (Storey, 75). Unused subs: Bedwell, Archibald-Menville, N Thompson, L Thompson.
Villa: Given; Lowton, Vlaar, Herd (Stevens, 31) Lichaj, El Ahmadi, Weimann, Bannan (Delph, 82), Ireland (Bent, 83); Agbonlahor, Benteke. Unused subs: Guzan, Albrighton, Holman, Burke.