Danny Philliskirk struck the killer blow at Boundary Park to give the Latics back-to-back home wins for the first time this season.
The hosts went in front after 32 minutes as full-back Carl Winchester won possession on the halfway line, burst into Swindon territory and scored with a superb dipping shot from 25 yards out.
Swindon then enjoyed their best spell, but Oldham created the better chances and went close to a second goal through Winchester and substitute Jonson Clarke-Harris.
Philliskirk's winner - a first goal in league football for the 22-year-old former Chelsea trainee - came 13 minutes from time when he dived to head home a left-wing cross from Jonathan Grounds.
The visitors almost snatched a draw in injury time, only for Dany N'Guessan to see his effort bundled off the line.
With Oldham now 16th in League One, Johnson said: "We are looking like a team who can go on a decent run.
"We lost at Wolves in midweek but we've already shown against good teams that we can punch above our weight in this division.
"The players have a good mindset and they are giving everything in every game, which is what you always need.
"They are young and have more to learn but as a group they are heading in the right direction.
"This is a great win for us. It was tough because we had to outnumber Swindon in midfield, but we worked our socks off to do that.
"The boys were fantastic against a very good Swindon side. We scored two excellent goals and it should have been more comfortable than it was.
"If we win our game in hand at Notts County on Tuesday night, we will be knocking on the door of the play-offs. That's where we want to be."