Swindon were on the verge of a seventh consecutive home win in League One courtesy of Kevin Amankwaah's second-half goal.
But the Addicks were not to be denied at the County Ground and highly-rated midfielder Bailey fired home in the second minute of time added on to deny Danny Wilson's side.
Swindon bossed the first half and Addicks keeper Rob Elliot made a fine save to deny midfielder Jonathan Douglas before Gordon Greer's header struck the bar.
Jonjo Shelvey struck the woodwork at the other end with a vicious drive from long range. But it was the Robins who deservedly broke the deadlock after 65 minutes when Jon-Paul McGovern's cross after a well-worked short corner was flicked on for Amankwaah to slot home.
Charlton pushed forward for an equaliser and it finally came right at the death when Bailey fired past David Lucas to silence the home supporters.