The late try also robbed the Tigers of any points from the game, with the score taking the margin beyond the seven points they needed to have secured a bonus point.
To add insult to injury, the Webb Ellis Cup was in attendance to mark the seven Tigers players who helped capture it Down Under last year, but there was little to shout about for the sell-out crowd before the parading of the Cup after the final whistle.
The game started in dull and overcast conditions, with the murky and misty conditions resulting in the game being played under floodlights.
The Tigers forwards had a clear advantage, with England lock forward Ben Kay one of the outstanding players as a string of rolling mauls got Leicester on the front foot. England's World Cup-winning captain Martin Johnson had a quiet game, by his lofty standards, alongside the energetic Kay.
Johnson also left the field at half-time, clearly still being troubled by the calf injury which has kept him on the sideline in recent weeks. But later in the game Johnson was back for a brief spell while Kay was in the blood bin.
Despite the performance of their star forwards and the advantage that it provided them, the Tigers could not turn this superiority into victory.
Apart from McRae's outstanding performance, also in impressive form for Gloucester was England reject Henry Paul. The former Rugby League star played a key role in two of the 'Cherry and Whites' tries, as well as kicking a penalty and a conversion.
The game got off to a very quiet start, with Andy Goode (for Leicester) and Paul (Gloucester) both missing early penalties.
In the seventh minute, the Tigers had a golden opportunity to put points on the board, with a kickable penalty. But they opted to go for the line-out, which turned out to be a big mistake. They failed to control the line-out just six metres out and Gloucester cleared their line.
The first 15 minutes also produced loads of kicking, mostly very poor, from both sides.
The first score came after 17 minutes, when McRae slotted a drop-goal to put his team in the lead.
Leicester hit back with a brilliant try from Ollie Smith in the 20th minute, when he breached the Gloucester defence, which earlier seemed impenetrable. The try was set up by an inch-perfect pass from Goode, who added the conversion for a 7-3 lead.
Goode and McRae both failed with drop-goal attempts as the kicking duel continued, before Paul narrowed the gap for Gloucester by slotting a penalty in the 34th minute. The penalty was the result of a deliberate knock-down by Tigers back rower Henry Tuilagi.
McRae put Gloucester back in the lead in the 37th minute with a drop-goal from right in front, after his forwards set the platform with some good work.
The Tigers then wasted a number of scoring opportunities, with Goode missing a long-range drop-goal, before they squandered two more chances from close in. Leicester had two line-outs in close succession and first they lost the ball at the line-out, before a knock-on robbed them of a second scoring chance.
With the referee playing extra-time, Gloucester made the Tigers pay for another blunder. Lock Alex Brown scored his team's first try after Leon Lloyd dropped the ball on attack and Gloucester broke out on the counter. A quick switch of direction saw the ball spun wide to the left, with Brown finding himself faced with a one-on-one against Tuilagi in open space.
Tuilagi did manage to scurry across and stop Brown, but the lock showed great presence of mind to quickly regroup and dot the ball over the line – with the score eventually being awarded by the video referee.
Paul missed the conversion, but his team had a 14-7 lead going into the break.
Goode narrowed the gap to just four points when he slotted a penalty in the 43rd minute.
But Gloucester showed how dangerous they could be when they get some quality ball, with Junior Paramore scoring a great try in the 48th minute after a good solid build-up. Paul added the conversion this time to make it 21-10.
Four minutes later the Tigers hit back with a try through Neil Baxter, but it was almost not to be. Baxter fumbled the ball and did well to recover it before it went to ground. It was set up by Goode, who first breached the Gloucester defence.
Goode reached the 22 before off-loading in a two-on-one situation to Baxter wide on the right who, despite the attentions of James Simpson-Daniel, managed to ground the ball at the second attempt in the corner after recovering from the tackle.
Goode failed with the conversion attempt, but at 21-15 they were back in the game.
When Goode added a penalty in the 56th minute, the Tigers looked like they would still sneak a win.
But a crucial missed penalty in the 68th minute by Henry Paul, which would have levelled the scores, gave Gloucester the impetus they needed.
Leicester had some other chances after this, but their ball control was simply not up to the required standards and they made far too many unforced errors.
In the final 10 minutes both teams opted to play the territorial game, but the Tigers kicked too much ball away – with Goode the main culprit.
Even though the conditions were not conducive to running rugby, keeping possession was vital and that they failed to do. Gloucester could be forgiven for simply hoofing everything deep into Leicester territory, as they were in the lead and did not want to make any mistakes inside their territory.
As it turned out Goode had another shot at goal, with only injury-time remaining, but he pushed it wide. Had the kick gone over it would have been a controversial score – since the Tigers clearly knocked the ball on before the referee awarded the penalty.
Deep into injury-time, McRae scored the try that sealed the win, when Tigers made a mistake and the 'Cherry and Whites' countered. Paul added the conversion for a 28-18 win.
For Leicester Tigers:Tries: Smith, BaxterCon: GoodePens: Goode 2
For Gloucester:Tries: Brown, Paramore, McRaeCons: Paul 2Pen: PaulDGs: McRae 2