Saints took the lead through a penalty try before the visitors hit back with a try from scrum-half Peter Richards.
A Mark Easter touch down made it 14-7 to the home side before Ludovic Mercier slotted a penalty for Gloucester.
John Clarke then went over for Saints and a Mercier penalty and a late penalty try were too little, too late for the Cherry and Whites.
Gloucester rugby director Dean Ryan:
"I was delighted with the courage our players showed. "They could and probably should have won the game in the last few minutes. Gloucester will keep going until the end and I feel disappointed that these young men did not get the reward that they probably should have.
"I do not believe they got the rewards for a fantastic effort. All of them were outstanding. We struggled a bit at set-pieces but we were playing with players who had never been near Premiership before."
Northampton: Pritchard; Rudd, Clarke, Quinlan, Reihana; Spencer, Robinson; Smith, Richmond, Barnard; D Browne, Gerard; Tupai, Harding, Easter.
Replacements: Diggin for Pritchard (59), Emms for Smith (57), Budgen for Barnard (41), Lord for Gerard (41), Fox for Tupai (50).
Not Used: Jones, Kydd.
Sin Bin: Easter (72).
Gloucester: Goodridge; Bailey, Fanolua, B Davies, Foster; Mercier, Richards; Wood, Elloway, Sigley; Pendlebury, Brown; Buxton, Hazell, Narraway.
Replacements: Thirlby for Goodridge (63), Garvey for Bailey (68), Thomas for Richards (69), Eustace for Pendlebury (63), Forrester for Narraway (50).
Not Used: Parkes, Forster.
Sin Bin: Buxton (55).
Att: 13,443
Ref: Dave Pearson (RFU).