Goals from strikers Dion Charles and Colby Bishop helped Stanley chalk up their first home win since February 2nd and moved them back to the fringes of the promotion places.
Charles fired home his 15th goal of the season on 11 minutes and Bishop, who went off injured in the second half, scored what turned out to be the winner just before half-time.
Stanley had not won at home for four games which John Coleman admitted was a worry but the win moved up to seventh place in League One.
Toby Savin came back into goal for the injured Nathan Baxter while Joe Pritchard was also out, with Sean McConville starting on his 32nd birthday.
Matt Butcher had the first shot on two minutes which skimmed wide of goal while a Michael Nottingham header was off-target from a McConville corner.
Stanley opened the scoring on 11 minutes when McConville’s cross found Bishop at the far post, he headed it back across the goal and, almost on the goalline, Charles nodded home his second in two games.
Swindon came close to an equaliser two minutes later when Scott Twine’s volley from 20 yards out wasn’t far off the top corner of the net.
John Sheridan’s side grew into the game and had the next chance with Jack Payne having a dangerous cross blocked.
They equalised on 30 minutes when a long ball forward from Akin Odimayo caught out the Stanley defence and it bounced for Brett Pitman who clipped it over Savin.
Swindon could have made it two a minute later when a Twine 20-yard free kick crashed off the crossbar and came down with Savin clearing it on the goalline for a corner.
Stanley went on the hunt for another goal but Nottingham’s curling strike from the edge of the box was straight at keeper Connal Trueman while a Charles effort was blocked.
From the resulting McConville corner on 44 minutes, Bishop got a firm header at the far post which bounced down and into the goal. It was his tenth goal of the season and first since his double against Bristol Rovers at the beginning of February.
In injury time of the first half, a Twine free kick had to be pushed out by Savin.
David Morgan came on for Paul Smyth at the break and Coleman immediately had to make another change as Bishop went down injured off the ball with Jon Russell replacing him.
Russell had a great chance to score on 71 minutes when Charles teed up the Chelsea loanee in the penalty area but he skied his effort over the bar.
Sub Adam Phillips rifled over while Swindon were still a danger with Savin having to superbly deny Twine in the 86th minute.
In injury time, Butcher rifled a 20-yard strike against the crossbar as the Reds collected a welcome three points.