The former All Black scrum-half was at his unpredictable best as he carved out two Saints tries, but Saints eventually paid the price for losing the forwards battle and giving away too many penalties.
Spencer weaved his magic with a sublime chip and chase before offloading to a waiting Steve Thompson.
Bruce Reihana added the conversion but the Gloucester fans soon had something to cheer about when summer signing Peter Richards left Northampton in their tracks. The scrum-half, stealing the ball from the back of the ruck, was let loose to dart 40 metres up field to score.
Ludovic Mercier kicked the conversion and then two further penalties but, despite conceding careless penalties from forward passes and a knock-on, Saints somehow managed to claw their way back into the game and create an eight-point lead by half time.
Northampton centre Jon Clarke was the man to turn the tables though it was Gloucester’s sloppy handling that really was the home side’s undoing.
First Richards fluffed a pass from the back of the ruck to Mercier who then offloaded an impossible ball to Mike Tindall. The England centre could not gather up and instead Clarke scooped the ball up and carried over to score.
Reihana added the conversion to hand the visitors the lead and, despite then losing prop Dylan Hartley to the sin-bin, Damien Browne finished a superb Saints try, all started by the mercurial Spencer in Gloucester’s own 22. Reihana again added the two points.
But the second-half re-start did not go to plan for Northampton as a defiant Gloucester hemmed the Saints back in their own 22.
Northampton’s front row forward Dan Richmond and Tom Smith were both shown the yellow card within minutes of each other. Four penalties later and Gloucester finally nailed a try with James Forrester carrying from the back of the scrum and then popping the ball up to Jake Boer.
James Simpson-Daniel conjured up a 65th-minute converted try thanks to a wayward pass from Spencer. The wing pounced on the ball and darted 65 metres up field to put Gloucester back in front 25-21.
Reihana gave Saints hope when his penalty took them to within a point of Gloucester but another Mercier penalty sealed a home win