Bradford City’s inability to defend set pieces resulted in a third successive home defeat at Valley Parade.
Alan Sheehan was also sent off in stoppage time for what referee Richard Clark deemed a punch into the midriff of central defender Raphael Rossi Branco.
City also lost Mark Yeates with a worrying shoulder injury.
Swindon’s £200,000 buy from Spurs, Jonathan Obika, got both goals for the visitors.
Bradford had been well on top in the opening 15 minutes even though Alan Sheehan had his second-minute penalty saved after goalkeeper Wes Foderingham had tripped Billy Clarke after he had stumbled in attempting to reach a back pass.
City continued to press and Louis Thompson, under pressure from Jason Kennedy, slid the ball into his own net in the 10th minute as Mark Yeates crossed from the left.
Swindon rallied and Obika headed home from six yards after Michael Smith headed Bradley Smith’s deep corner back across goal.
Obika struck again before the break, reacting quickly and firing the ball into the roof of the net after the ball cannoned off a City defender from a corner.
Swindon dominated the early stages of the second half but Bradford rallied and Sheehan forced a fine save from one free-kick before being narrowly off target with another.
Stephen Darby’s glancing header almost brought an equaliser before Sheehan’s late dismissal.