A superbly struck free kick five minutes after half time earned Swindon all three points and extended their unbeaten run to seven games.
Skipper Andrew Gurney was the marksman with a right-foot shot from the corner of the box after Sam Parkin was fouled by Graham Allen.
Gurney was the star of the show for Swindon with terrific support in central defence from Matt Heywood and Alan Reeves.
Tranmere had the better of the early exchanges, but Simon Haworth and Iain Hume missed the target.
Swindon gradually came more into the picture but Heywood missed a golden chance when firing wide in the 39th minute. Soon afterwards Parkin had a goal harshly ruled out for offside.
Town keeper Bart Griemink then produced the save of the match in first-half injury time as he turned over a powerful strike by Haworth.
Tranmere sent on Jason Price as an extra attacker but were continually frustrated by their opponents and Parkin went close to a second for Swindon.
As Tranmere rallied later on both Haworth and hard working Hume cleared the bar.
"We took control of the game after a somewhat lethargic opening and produced some quality play," said Swindon manager Andy King. "The midfield showed great energy and we defended magnificently when we had to.
"We are the in-form team in this league and I think the players are beginning to believe they can achieve something." Tranmere manager Ray Mathias said: "We worked tremendously hard throughout the 90 minutes. We were unfortunate to lose the game.
"A silly free-kick undid us in the end. We needed that bit of luck but the ball did not fall for us."