Grayson, a member of England's World Cup-winning squad, slotted one conversion and three penalty goals to see his side home in his first game since March 6 – when the world champions lost to Ireland in the RBS Six Nations at Twickenham.
He missed England's last two Six Nations games with a calf-muscle injury, which saw Bath star Olly Barkley wear the England No.10 shirt in his absence.
Bath fly-half Chris Malone put his side ahead in the 14th minute with a penalty goal, but Grayson kept the home side in the mix with a successful shot at goal just two minutes later.
Another Malone penalty, in the 30th minute, gave the visitors the half-time lead, but Grayson drew level just over minutes into the second half, before Saints wing John Clarke delivered the coup de grace with a runaway score in the 52nd minute.
Grayson, of course, did not miss with the conversion, also adding another penalty shortly before full-time, just for good measure.
This win cements Northampton's third-place position on the Zurich Premiership standings, but they are still unable to catch one of London Wasps or Bath. The latter, however, can still be caught by the former, with the first-place team earning automatic qualification to the Zurich Final in May.
For Northampton SaintsTry: ClarkeCon: GraysonPens: Grayson 3
For Bath:Pens: Malone 2