A try from George Pisi after 17 minutes gave Saints the lead, which was extended after Ryan Lamb's conversion.
Dylan Hartley's try five minutes later increased the away side's advantage, before two penalties from Freddie Burns brought Gloucester back into the game.
After the break, Burns hit another two penalties on 41 and 47 minutes as Gloucester looked to mount a serious comeback.
However, Pisi's second try on 50 minutes gave Saints some breathing space as they headed into the last half hour of the game.
The home side scored a penalty try on 71 minutes, before Burns made the conversion afterwards to bring the score to 19-24.
Northampton held on to their lead and secured the victory.