Town looked like they were about to slip out of the automatic promotion places via a 1-0 reverse at Whaddon Road and with Burton Albion leading 3-2 at Accrington.
But James Beattie scored a late equaliser for Stanley, meaning Aidy Boothroyd’s men stay third despite losing away from home for the 10th time this season.
Elliott’s crucial goal came in the closing stages of the first half of a game at Cheltenham in which Northampton never really found their momentum.
Their best spell came in the second half and their best chances through Chris Hackett and Roy O’Donovan but a single goal always looked like being enough and so it proved.
John Johnson made a good block tackle on Byron Harrison as the Cheltenham striker looked to make an almost immediate impression on the game, Joe Widdowson replicating the challenge with one on Darren Carter minutes later.
Adebayo Akinfenwa, so often a thorn in Cheltenham’s side but nullified on this occasion, planted a header wide when he should have done better with an excellent Ishmel Demontagnac cross that swirled away from home goalkeeper Scott Brown.
Town enjoyed a near-profitable skirmish on the edge of the hosts’ box midway through the half when Brown punched a clearance to Demontagnac who cleverly passed to Ben Tozer although he could find no way through the scattered defence.
Cheltenham had been on the front foot for most of the half but made bad decisions in key areas until Steve Elliott gave them the lead.
The centre-back, who was in an attacking position for a long throw, headed Keith Lowe’s right-wing cross straight at Lee Nicholls but reacted quickest the reach the rebound first and stab it into the net.
Chris Hackett looked to provide Northampton with a response early in the second half, skewing a shot wide on the half-volley from Akinfenwa’s flicked header on.
A lack of accuracy undermined the away side for much of the game but Hackett was a force, drawing a good save from Brown with a fizzed left-footer after stepping inside his marker.
O’Donovan then ghosted in around the back from a long Lee Nicholls kick, Brown making a good early decision to come off his line and ultimately save with his feet, a save he reproduced after Hackett had played the Irishman in with a slide-rule pass inside the left-back Sido Jombati.
It was to be Northampton’s last good chance of the game as the home side held on to secure three points that moves them level with Town in the league table, but a place below them on goal difference.
Cheltenham: Brown, Lowe, Elliott, Hector, Jombati, McGlashan, Carter, Pack, Deering, Harrison, Benson
Subs: Mohamed (for Deering 74), Taylor (for Harrison 83), Penn (for McGlashan 90+1)
Not used: Roberts, Jones, Harrad, Duffy
Cobblers: Nicholls, Johnson, Carlisle, Collins, Widdowson, Hackett, Tozer, Harding, Demontagnac, O’Donovan, Akinfenwa
Subs: Guttridge (for Widdowson 84)
Not used: Snedker, Cameron, Platt, Robinson, Hornby, Dias
Away fans: 934