Talismanic striker Adebayo Akinfenwa converted two second-half penalties inside four minutes after having five stitches inserted in a head wound as the Cobblers answered manager Stuart Gray's call to start the new season running.
Akinfenwa, who missed most of pre-season recovering from a knee operation, was off the field for ten minutes early on while a head wound was sewn up, but he came back to help Northampton to only a second home opening day win in 35 years.
Cheltenham went ahead when Gabor Gyepes prodded a shot by David Bird past his own goalkeeper after Andy Lindegaard found space down the right behind the home defence.
Northampton were on terms when debutant Liam Davis chipped a cross to the back post and, when Mark Hughes nodded it back over the defence, skipper Chris Doig charged in to rifle the ball into an unguarded net.
Cheltenham should really have led in the 15th minute when Paul Connor beat the offside trap, but the striker dallied and his eventual shot went harmlessly wide.
Meanwhile at the other end, efforts from distance by Luke Guttridge and Danny Jackman were firstly deflected over the bar and then well saved by Shane Higgs.
Akinfenwa's first penalty was converted in the 64th minute after a rash challenge by Bird on Jackman inside the penalty area and his second, following a foul by Michael Townsend on former Southend man Guttridge, who was one of three home players making debuts.
The Robins were unlucky when Shane Duff's header was tipped over the bar by Mark Bunn, but Cheltenham hauled it back to 3-2 in the 74th minute when Gyepes was adjudged to have fouled Townsend and the same player picked himself up to score.
However, Northampton restored their two-goal advantage when Akinfenwa held the ball up for Leon Constantine to net his first goal for the club following his summer move from Leeds United.