The 19-year-old utility player nodded home a left-wing cross from Lee Brown at the far post after David Clarkson's incisive pass had begun the move.
The Cobblers finished with 10 men after having striker Roy O'Donovan sent off for a second yellow card in injury time when he jumped to prevent the taking of a throw-in.
In a game of few clear chances the visitors felt they were denied a 38th-minute penalty when Rovers substitute Matt Harrold tangled with Matt Heath.
Chris Hackett went close to an equaliser in the last minute of normal time with a curling free-kick that rebounded back off a post.
Northampton's best first-half chance fell to Clive Platt early on, but his close-range header was well save by Steve Mildenhall.
A closely-fought second half saw John-Joe O'Toole fire wide and Clarkson shoot into the side-netting for Rovers.
Aidy Boothroyd's side had six players booked by referee Mark Haywood, including midfielder Hackett for diving.