ADAM Forshaw slammed in a stoppage-time penalty as Brentford edged a seven-goal thriller at Prenton Park.
Debutant Martin Taylor and Donaldson had given the Bees a dream start, only for Tranmere to haul themselves level.
Donaldson restored Brentford's lead midway through the second half, but Rovers hit back again late on.
But Forshaw stepped up to blast home from the penalty spot and earn three hard-fought points for the Bees.
Uwe Rosler made five changes from the side that were thrashed at Bradford last weekend, with Richard Lee, Taylor, Alan McCormack, Toumani Diagouraga and Will Grigg handed starts.
The Bees flew out of the blocks and broke the deadlock inside two minutes.
Tranmere keeper Owain Fon Williams could only parry Harlee Dean's sweetly-struck volley, and Taylor was on hand to stab home the rebound.
Brentford continued to dominate, with Fon Williams doing well to hold Grigg's snap-shot and Shaleum Logan firing over.
But the visitors did eventually double their lead through Donaldson.
Toumani Diagouraga's shot cannoned off the post cannoned back off the post, and when the ball eventually broke to Donaldson he slammed it into the roof of the net.
The Bees had a scare at the other end when Lee got down well to his left to turn Danny Holmes' deflected effort around the post.
It was almost 3-0 midway through the half when Grigg's overhit cross almost caught out Fon Williams, but the keeper palmed the ball to safety.
Rovers came into the game as the half wore on, with Ian Goodison heading into the arms of Lee.
Their pressure paid off just before the break when Jean-Louis Akpa Akpro teed-up Chris Atkinson to slot under Lee and hand the hosts a lifeline.
Tranmere started the second half as they ended the first, with Lee doing well to tip James Rowe's rasping drive over.
However, Rovers eventually drew level shortly after when Adam Dugdale rammed the ball home after Lee had saved Joe Thompson's point-blank header.
The Bees hit back with just over 20 minutes remaining, with Donaldson scoring a second to restore their lead when he stooped to head in Logan's teasing cross.
Tranmere wouldn't lie down, with Lee thwarting Max Power with his legs.
But they levelled in the 90 th minute when Cole Stockton ghosted in to fire past Lee.
However, Forshaw held his nerve to win it from the spot after a Tranmere player had handled in the box.
BEES: Lee, Logan, Dean, Taylor, Craig, Diagouraga, McCormack (Fillo 59), Saville (Teixeira 90), Forshaw, Grigg (Trotta 87), Donaldson.
Subs (not used): O'Brien, O'Connor, Reeves, El Alagui.
Follow me on Twitter .