Harry Thacker haunted his former club with the pivotal late score as Bristol Bears recorded their first victory at Welford Road since 2002.
The hooker scored his side's third and decisive try late in the game to keep Bristol's hopes of a top-six finish alive in the Gallagher Premiership while the Tigers' top-flight status is still not guaranteed after this defeat.
George Ford and Callum Sheedy traded penalties before Jordan Olowofela and Sheedy dotted down to leave the score 11-11 at half-time.
Despite Dan Thomas' third try in as many games, Ford's boot appeared to have given Leicester the win and secured their safety before Thacker's score clinched the game.
The result means that Bristol close the gap on sixth-placed Sale Sharks – their next opponents – to three points with two rounds left.
For Geordan Murphy's side, the losing bonus point means their top-flight status is nearly secured but they will be counting the cost of letting academy prospect Thacker leave, the hooker also bagged a double in Bristol's win at Ashton Gate in December.
Both sides entered this encounter with the league's most porous defences, conceding a combined 1,082 points and 141 tries, yet scoring opportunities were at a premium in a tight opening half-hour.
Ford opened the scoring with a penalty after John Afoa's infringement at the breakdown.
Bristol's response was swift, with Sheedy converting a penalty from in front of the posts following a collapsed scrum.
The visitors' bold and open style of play has often been a double-edged sword for them and so it proved again in the 20th minutes.
Thomas collected Tatafu Polota-Nau's overshot lineout but his hurried pass in his own 22 forced Sam Bedlow into a knock-on, which led to Ford knocking over three more points after Bristol were penalised at the ensuing scrum.
But the Bristolian pack responded, with a driving maul forcing another penalty that Sheedy converted to level the scores again at 6-6.
Tigers grabbed the game's first try in the 30th minute as quick hands from Jonny May and Guy Thompson released Olowofela to score in the corner.
But Bristol were not behind for long. An excellent box kick from Andy Uren camped Bristol deep in Leicester's 22 and Sheedy punctured a hole in the home side's defence to level the game at 11 points apiece at half-time.
Ford kicked the Tigers back into the lead shortly after the break after the Bears were penalised at the ruck.
Although Matt Toomua was sin-binned, Leicester's defence held the Bears at bay on their own try line before earning another penalty at the breakdown which Ford converted to extend the lead to 17-11.
However, Pat Lam's men exploited their numerical advantage in the 58th minute when Piers O'Connor broke on the right and the ball was worked to Thomas to run in for the score.
Leicester's scrum started to prevail as the second half wore on, allowing Ford give his side breathing space with another successful kick from the tee with 10 minutes to go.
There was a sting in the tail of the game for the hosts, though, as successive driving mauls from Bristol saw old Leicester boy Thacker touch down against his former employers for the third time this season to win the game.