Freddie Burns's late penalty ensured Gloucester survived a Northampton fightback to edge to victory.
The Cherry and Whites seemed in control at the break as tries from Charlie Sharples and Darren Dawidiuk helped them into an 18-9 half-time lead.
But Northampton hit back to level at 24-24 thanks to Soane Tonga'uiha's converted try and George Pisi's score.
Stephen Myler missed the conversion and Burns made him pay with the decisive penalty six minutes from the end.
That late effort meant Burns ended with a 17-point haul from a thrilling game.
Gloucester began brightly and were rewarded when Sharples outflanked the Saints defence to open the scoring, Burns adding the conversion.
Saints, who lost young wing Jamies Elliott to injury, hit back with a Lamb penalty only to have that cancelled out by one from Burns.
Two more Lamb penalties and one from Burns left Saints only three points adrift, but Gloucester went into the break with a nine-point advantage when Northampton, who had England forward Courtney Lawes back from a six-week injury lay-off, gave away possession inside their own 22 and were punished when Dawidiuk touched down.
Lamb and Burns again exchanged penalties before the Saints comeback began when Tonga'uiha drove over to score and replacement fly-half Myler added the conversion.
A long-range Burns penalty temporarily eased Gloucester nerves but Northampton were level when Pisi broke from halfway to touch down in the corner and level the scores.
Myler missed the conversion, and, although Burns then hit the post with a 25-metre penalty, he went on to win it with a simple kick after the visitors were penalised again.
VIEWS FROM THE DRESSING ROOM
Gloucester coach Bryan Redpath told BBC Radio Gloucester:
"It was going to be tough for Northampton to cope with us, but credit to them they came back. Our exits when we did score were poor which allowed them opportunity to pick the scoreboard off.
"We'll take the win today; we knew how tough it would be with the players who were out, especially with the back row.
"We were a bit sloppy, we created opportunities for them and gave them point after point and you can't do that, it's something that we need to move on from.
"On the whole, I am disappointed but still relieved to get the win and we march on to Bath next week."
Northampton Saints director of rugby Jim Mallinder told BBC Radio Northampton:
"I think we gave ourselves a little bit too much to do. It was a poor first-half - we were inaccurate and didn't get out of our half very well.
"We talked about doing simple things well, to shut the crowd up, and unfortunately we didn't do that.
"It's a [losing bonus] point. It's always hard to come to Kingsholm but we wanted to come for the win.
"Courtney Lawes played really well. It's always difficult when you've been out for a long time. I'd think that Stuart Lancaster and England would be fairly keen to see him get another 80 minutes of rugby."
Gloucester: May, Sharples, Tindall, Fuimaono-Sapolu, Simpson-Daniel, F. Burns, R. Lawson, Wood, D. Dawidiuk, Harden, James, Brown, A. Qera, Cox, Buxton.
Replacements: Molenaar for Fuimaono-Sapolu (74), Murphy for Wood (74), Cortese for D. Dawidiuk (76), Knight for Harden (63). Not Used: Britton, Langley, Lewis, Mills.
Northampton: Diggin, Elliott, Pisi, Downey, Artemyev, Lamb, Roberts, Tonga'uiha, Long, Mujati, Manoa, Day, Lawes, Clark, Wilson.
Replacements: May for Elliott (8), Myler for Lamb (58), Haywood for Tonga'uiha (74), A. Waller for Long (74), Doran-Jones for Mujati (55), Sorenson for Wilson (68). Not Used: Nutley, Glynn.
Ref: John Paul Doyle (RFU).