A late strike from Ryan Lowe earned Rovers a place in the second round of the FA Cup with Budweiser.
The sides looked set to go to a replay when the striker found the net from close range in the final minute of normal time.
Ronnie Moore made one enforced change to the side that drew at Preston as the suspended Max Power was replaced by Jason Koumas in midfield. Ian Goodison and Evan Horwood returned from suspension and injury respectively to be named among the substitutes.
Rovers enjoyed the majority of the early possession but without creating a shot on goal. The home side responded well and went close through James Gray and Kai Naismith in the fifth and seventh minutes before Lee Naylor volleyed inches past Owain Fon Williams' right hand post from 25 yards.
Stanley were handed a great chance to open the scoring on 13 minutes when Jim McNulty's attempted back pass to Fon Williams hit Tom Hateley and landed in the path of Kayode Odejayi. The Rotherham United loanee raced towards goal but Fon Williams was quickly off his line and gathered at the striker's feet.
Peter Murphy fired wide of the Rovers goal on 15 minutes while two Koumas efforts went over the bar at the other end soon after.
Naismith forced a save out of Fon Williams on 17 minutes and volleyed the rebound over the bar and Stanley went close again two minutes later when Fon Williams saved from Piero Mingoia.
Ryan Lowe headed into the Stanley net on 37 minutes from Koumas' corner but his effort was ruled out for a foul on Odejayi by a team mate.
After Holmes had ended Odejayi's run towards goal on 51 minutes, Atkinson brought a save out of Bettinelli with a 20 yard volley from a central position.
Koumas and Lowe linked well to find Ridehalgh on 54 minutes but his angled drive went over the Stanley goal.
Jean-Louis Akpa Akpro was brought on in place of Tom Hateley on 59 minutes and the striker was involved soon after, running at the Stanley defence and earning his side a corner.
Naismith's attempt at chipping Fon Williams was hit straight at the Rovers keeper on 76 minutes while Akpa Akpro headed wide at the back post from Kirby's right wing cross seven minutes later.
With the tie looking set to go to a replay, Rovers netted in the 90th minute. Akpa Akpro picked up possession outside the Stanley area and chipped a pass through to Lowe who side footed past the keeper from close range.
There was still time for Stanley to try to equalise but Liam Ridehalgh cleared Mingoia's shot off the goal line in the 92nd minute as Rovers held on for the win.
Accrington Stanley: Bettinelli, Murphy, Joyce, Aldred, Winnard, Naismith, Mingoia, Hunt (Windass 45HT), Gray (Bowerman 76), Odejayi, Naylor. Unused substitutes: Dunbavin, Liddle, McCarten, Hatfield, Windass, Mahoney.
Tranmere: Fon Williams, Holmes, Taylor, McNulty, Ridehalgh, Baggie (Stockton 86), Koumas, Hateley (Akpa Akpro 59), Atkinson, Kirby, Lowe. Unused substitutes: Mooney, Goodison, Horwood, Rowe, Jennings.
Referee: Sebastian Stockbridge
Yellow cards: Akpa Akpro (88)