Oldham started as the better side, and they took the lead after only 14 minutes when Cooper scored from close range after some poor Swindon defending that had allowed the ball to be crossed in.
In the first half Grant Smith missed Swindon's best chance so far with his shot going just wide. Sam Parkin also came close to scoring for Swindon just before half time, but his shot was saved.
Oldham had a number of good chances to score in the first half, and it was down to some good saves by Rhys Evans that kept Swindon in the game with Oldham going into the half time break winning 1-0.
At half time Swindon made a sub with Sammy Igoe replacing Miglioranzi, Swindon also looked a lot better in the second half than they had done in the first half.
Swindon equalised on 60 minutes when Jamie Slabber had his shot saved, the ball the rebounded and fell to Sam Parkin who also had the ball saved, but they ball rebounded for a second time and Parkin was able to score with a header from just six yards out.
Swindon scored their winner 9 minutes later after another goal mouth scramble. After being set up by Jerel Ifil Parkin had his shot saved, but then Grant Smith also had a shot saved, but was able to score from a close range rebound to make it 2-1.
Both sides has chances to score more goals, with Sean O'Hanlon having to make a good tackle to deny a goal by Kevin Betsy. Rory Fallon on as a late sub for Jamie Slabber also came close to scoring but his shot went over the bar.
Overall a fairly average game, but an important win for Swindon which sees the move up to 8th place, only 5 points off a play off spot. Swindon's next game is at home to Barnsley next Saturday.