Yeovil looked to be heading for another goalless draw until skipper Terry Skiverton moved up deep in stoppage time to crash home a left-footed drive from an Anthony Barry corner.
There was relief all round in the Glovers camp as they had gone eight matches since the turn of the year without a win and more than 400 minutes without a goal at home.
Northampton had strung together six games without defeat but in this one they were on the back foot for most of the time.
Andy Kirk, who left them six games ago for Somerset, was Yeovil's dominant player in the first half and, in addition to going close to opening the scoring himself, laid on two chances for Lloyd Owusu which the big man should have put away.
Northampton looked lethargic up front and there was a comparatively easy debut for Yeovil's new keeper Scott Flinders.
The 21-year-old has joined them on loan from Crystal Palace because of a serious injury to Steve Mildenhall and it was 85 minutes before he had a shot to save.
Danny Jackman fired in a 20-yarder but it lacked power and was easily caught.
In the 73rd minute Yeovil appeared to be denied a penalty when Kirk was upended.
"This club has had just one penalty in 88 games. This should have been a second. It was a stonewall kick," said manager Russell Slade afterwards.
Opposite number Stuart Gray said: "The referee was close and if it was a stonewall penalty he should have given it.
"If it wasn't he should have booked the lad for diving. He did neither.
"It was disappointing that our unbeaten run ended like this, but neither side created much in the final third and there are obviously ways in which we have to improve."