Ally Hogg and Michael Young scored tries for the in-form Falcons, who appeared to be coasting towards victory when they led 21-10 in the early stages of the second half.
However, they were indebted to a missed conversion in the closing minutes, Billy Twelvetrees unable to add the extras after Lewis Ludlow had barged his way over from close range.
Billy Burns had earlier failed to convert tries from Jason Woodward, David Halaifonua and Mark Atkinson for the hosts, meaning Gloucester came up short in the final reckoning.
Denny Solomona celebrated signing a new contract with Sale by scoring a hat-trick of tries in the Sharks' 34-25 win over struggling Northampton.
The winger, who penned a four-year deal during the week, completed his treble in the first half as Sale, which also saw Marland Yarde cross, wrapped up a bonus point before the break.
Having trailed 31-6 at half time, Northampton responded with three tries of its own in the second half, Michael Paterson, Rob Horne and Heinrich Brussow the scorers, but the Sharks held for their first league win at Franklin's Gardens since May 2006.