The pitch was wet, and muddy which partly lead to Sol Davis being sent off for his second bookable offence after his two-footed challenge on Gabbiadini.
Shortly afterwards Danny Invincibile scored from close range to make sure of all 3 points.
Jamie Forrester scored late on for Northampton, but Swindon were able to hold on for their second win in a row, and have now gone 5 games unbeaten.