The Millers started brightly and went ahead in the 21st minute when Alex Revell powered home a header to mark his debut with a goal.
Swindon were level, though, before the break when Matt Richie turned a corner in at the far post, with the aid of a deflection off Tom Newey.
Rotherham restored their lead midway through the second half as Revell’s debut got even better when he headed home for the second time, but the Millers’ luck turned soon after as Danny Schofield saw red for two yellows.
And before Schofield had time to take his early shower, Swindon were level as Connell nodded in his first Swindon goal.
The turnaround was complete when Connell headed home Ritchie’s cross in the 81st minute to earn the Robins their first win since the opening day of the season, despite the late dismissal of Alberto Comazzi, and condemn the Millers to a first loss of the League Two campaign.