With half-an-hour remaining, a disjointed Bristol appeared likely losers but two tries in three minutes stunned the Saints, who followed up a home loss to London Irish with another shock defeat to dent their hopes of challenging Exeter at the top of the table.
Harry Mallinder crossed over for Northampton with James Grayson on target with three penalties.
With their first attack, Saints took the lead as number eight Teimana Harrison – on his 150th appearance for the club – made three powerful bursts into the heart of the Bristol defence before Rory Hutcinson provided Mallinder with an easy run-in.
The hosts then suffered a blow when promising lock Alex Moon was forced to leave the field with an injury but they overcame this setback to extend their lead when Grayson kicked a straightforward penalty.
Saints continued to dominate the opening half-hour as their opponents struggled with their handling as both Nathan Hughes and Sam Bedlow made unforced errors to prevent the visitors from building any momentum.
Another mistake from the Bears gave powerful wing Taqele Naiyaravoro the chance to hand off two defenders and – when Bristol were penalised – Grayson fired over his second penalty.
It took Bristol until the 35th minute to secure a platform in the home 22 but they could not capitalise on a succession of forward drives so Northampton deservedly held an 11-0 half-time lead.
The away side made a couple of changes at the break with Purdy and Joe Joyce introduced in an attempt to reverse their fortunes.
It did not produce immediate results as Grayson kicked his third penalty within three minutes of the restart, which resulted in the visitors making another change with hooker Will Capon coming on in place of Shaun Malton.
Bristol scored their first points nine minutes after the break when Sheedy kicked a simple penalty after Hutchinson was shown a yellow card for a high tackle on Joyce as the lock looked set to crash over under the posts.
A penalty try award was surely a consideration but the referee ruled there was a potential covering tackler.
Sheedy’s penalty was the only score of a featureless third quarter but – before Hutchinson could return from the sin-bin – Bristol capitalised when Piers O’Conor split the defence with an excellent break before Purdy seized on a gap to race over.
Sheedy converted with an excellent touchline kick before Bears scored a second try within minutes to stun Northampton.
Replacement scrum-half Andy Uren broke through the home ranks before Thiede forced his way over from close range and Madigan’s last-minute penalty completed Bristol’s comeback.
Sign up to our mailing list here and we’ll keep you up to the minute with weekly updates from the world of rugby.