Damian Spencer scored his second goal in as many games to steer Cheltenham to a hard-earned win that dents Northampton's play-off hopes.
Steve Guinan's well-struck shot hit the upright and Spencer turned the ball home from a narrow angle.
Northampton striker Andy Kirk squandered a number of chances to level before the break.
Shane Duff's block denied David Rowson while Cheltenham substitute Adam Connolly went close late on.