Richard Walker hit Northampton's winner for the second time in three days as the Cobblers ended a poor year on a high note.
Walker's close-range finish in the tenth minute from Mathew Sadler's left-wing cross meant Northampton were able to record back-to-back wins for the first time in four months following their success at Bristol Rovers on Boxing Day.
But they had to sweat in the second half, as they survived a number of scares from a Cheltenham side who had looked there for the taking in the first half.
Northampton boss Colin Calderwood said: "We didn't go to the next level in our performance and they played well in the second half." Walker's goal was sandwiched between two other clear early chances as the home side made the early running.
Derek Asamoah, making his first league start of the season, fired into the side-netting after being put through by Walker while the same player's 11th minute header from a Des Lyttle cross brought an excellent stop by Cheltenham goalkeeper Shane Higgs who was later to be replaced by Steve Book.
Walker could have given the Cobblers the cushion they needed two minutes before the break after a neat interchange with Martin Smith but Higgs kept out his drive.
The match turned on its head after the break. Veteran striker Bob Taylor set the pattern with a ferocious volley which saw Lee Harper produce a spectacular mid-air punching save to protect the lead.
That was followed by a desperate clearance from Paul Reid before Martin Devaney fired into the side-netting from a good position for the second time in the match.
Cheltenham continued to press, but all in vain. Taylor curled a 64th minute free-kick just a fraction wide of Harper's right-hand post while substitute Paul Brayson also tested Harper late in the game from another set piece, but the home goalkeeper proved equal to the task and Northampton survived.