Trailing by five points Gloucester threw everything at Leicester in the final few minutes and were twice thwarted by the Tigers' last ditch defence on the line.
Anthony Allen scored the only try of the match against his former club seven minutes after half-time following intense pressure from a Leicester pack that dominated a match in which four players were yellow carded.
Leicester's other points came from fly-half George Ford, who kicked three penalties, and Geordan Murphy who added another. Fly-half Freddie Burns slotted four for Gloucester.
The withdrawal of England fly-half Toby Flood through illness deprived a capacity 24,000 crowd of a shoot-out with Gloucester's rising star Burns, who made his England debut as a replacement against the All Blacks.
It did, however, lead to a battle of the young pretenders for the England No10 spot, with 19-year-old Ford called up to replace Flood. On a pitch made heavy by recent rain their kicking was more important than usual.
Burns won the battle in the first half, slotting two penalties out of three to Ford's one from three, giving Gloucester a 6-3 half time lead.
They would have been more than happy with that after spending most of the 40 minutes on the back foot, especially in the scrums where they were continuously marched backwards as if on wheels.
Leicester dominated that set piece so much that referee Andrew Small eventually lost patience in the 24th minute and showed Gloucester tight head prop Shaun Knight a yellow card.
Leicester, however, were unable to take advantage and around the half-hour mark they opted for four successive scrums near the Gloucester line instead of taking the three points from a penalty and came away with nothing.
Gloucester were awarded a penalty at the fourth scrum, escaped their own half and saw Leicester reduced to 14 men when scrum-half Ben Youngs was sin-binned for killing the ball. It was his second yellow card in successive games.
Burns missed the 45-metre penalty but he had already succeeded with penalties in the eighth and 27th minutes, while Ford's only success came in the fifth minute. He missed penalties in the 21st and 29th minutes, and he topped the second one so badly it hardly got off the ground.
The second half started with a bang and within seven minutes Burns had kicked his third penalty, and Leicester had scored a try and seen another player sin-binned.
Burns' penalty came after Ford was yellow carded for killing the ball in front of his own posts as he attempted to make amends for a move which went horribly wrong, his pass to Manu Tuilagi going to ground and allowing Burns to hack the ball upfield.
As Ford trooped off Youngs came back on and he provided the scoring pass from a ruck on the line for former Gloucester centre Allen to score in the corner after intense pressure from the Tigers pack.
Murphy, who took over the kicking duties from Ford, missed the conversion but slotted a penalty after Gloucester lock Will James became the fourth player to be binned.
That put Leicester 11-9 ahead and Burns missed a chance to restore Gloucester's lead when he was wide with a difficult 57th minute penalty.
Ford made it 14-9 with a penalty shortly after returning to the pitch as Leicester continued to dominate but Burns put Gloucester back in the game with a long range penalty 11 minutes from time.
Ford kicked his third penalty to make it 17-12 and while Gloucester staged a grandstand finish Leicester held on.
- Sports & Recreation