In a physical opening, Gloucester centre Henry Paul was the only name on the scoreboard, after a sweetly-struck penalty in the third minute.
The Saints' pack was looking stronger, but the flow of possession was too slow for the free-running backs to do anything substantial with it, and Gloucester's defence was admirably aggressive.
Gloucester looked the more threatening, and after fly-half Duncan McRae had been foiled by a horrible bounce when following up a hack-through, Gloucester finally made their superior team play count.
Marcel Garvey broke away up the middle and from the resulting ruck, prop Terry Sigley was sent into space. The hooker drew Saints fullback Bruce Reihana superbly before releasing hooker Olivier Azam, whose try was comfortably converted by Paul.
In between Shane Drahm, on for injured fly-half Paul Grayson, had put the Saints on the board with a penalty, and McRae's drop goal increased the lead to 13-3 shortly before half-time.
Drahm added another penalty to keep the home team within a score at the break, and booted another after some punching by Azam on Reihana, for which he was lucky to escape a yellow card.
Then Saints skipper Corné Krige touched down, but the try was disallowed after referee Steve Lander had spotted a knock-on in the preceding line-out.
From then on Gloucester started to dominate, their backs producing a mixture of incisive running but sadly lacklustre handling, which cost them points. Paul's boot was misfiring as well, the New Zealander missing twice from goalable positions.
When Jamie Forrester was sin-binned for killing the ball during a menacing Northampton counter-attack, many would have thought Gloucester had blown their chance.
From the resulting penalty, Drahm reduced the gap to a point, then missed a long-range effort, and Reihana made three telling breaks as Gloucester lost the initiative.
A minute into injury time, and with Northampton's attempts to get the winning score becoming increasingly frantic, Gloucester stole the ball, and with no cover at full-back, McRae chipped through for the excellent Garvey to clinch it.
For Northampton:Pens: Drahm 4
For Gloucester:Tries: Azam, GarveyCons: PaulPens: PaulDrops: McRae
Yellow cards: Forrester (Gloucester)