Midfielder Bailey left the field in tears after sending his side's second penalty of the shoot-out high over the crossbar, while Stephen Darby converted Swindon's final spot-kick to secure Town a shot at reaching the Championship.
Swindon had looked down and out midway through the second half when, at 2-0 down on the night and 3-2 on aggregate, they lost defender Gordon Greer to a red card.
But the 10 men levelled through Danny Ward and, when 180 minutes of football plus half an hour's extra time, six goals and two sendings off failed to separate the sides, the Robins prevailed on penalties.
Danny Wilson's side will now face either Huddersfield or Millwall in next weekend's final.
Their evening had got off to a rotten start, however, when goalkeeper David Lucas injured himself in the opening minute, leaping to collect a high ball and landed awkwardly after colliding with team-mate Jonathan Douglas.
Lucas had to go off clutching his shoulder, with substitute Phil Smith pressed into action.
Charlton made the breakthrough in bizarre fashion after 27 minutes when Smith missed Gary Borrowdale's inswinging corner and Simon Ferry, supposedly guarding the far post, contrived to hook the ball back into his own net under pressure from David Mooney.
The second goal arrived just before the interval when the lively Kyel Reid wriggled clear of Darby down the left and pulled the ball back for Mooney, who coolly dispatched it first time past Smith and into the net.
Swindon had, by this time, barely mustered a shot on target. And their hopes appeared to be at an end when they were reduced to 10 men after Greer rammed his studs into Deon Burton's midriff and got a straight red card for his trouble.
But amazingly the visitors got back on level terms just seven minutes later when Ward took advantage of a calamitous defensive mix-up and tucked the ball through keeper Darren Randolph's legs and into the net.
Smith kept his side in the game with saves from Burton and Bailey before referee Neil Swarbrick evened up the numbers when he sent off Addicks defender Miguel Llera for bringing down Charlie Austin in stoppage time.
Charlton had by far the better of the chances in extra time, with Scott Wagstaff shaving a post, Frazer Richardson smashing a shot, against the same upright, Smith saving from Nicky Forster and Therry Racon and Burton firing agonisingly wide.
But the Addicks, relegated from the Premier League just three years ago, could not find a way through and when penalties came around, the Robins' nerve held where Bailey's did not.