Irish Under-21 international Paddy Madden put Yeovil ahead after nine minutes with his third goal for the Glovers, firing past a wrong-footed Owain Fon Williams from six yards out.
Sam Foley doubled the visitors' lead on 29 minutes as Tranmere failed to deal with Keanu Marsh-Brown's deep cross and the unmarked Irishman smashed home from six yards.
Former Everton man James Wallace got Tranmere back into it before the break with a powerful header from Adam McGurk's cross for his second this term.
On-loan Wolves striker Jake Cassidy drew Rovers level after 51 minutes when he fired home his eighth of the season past Marek Stech.
Joe Edwards was then dismissed when he picked up a second yellow card and Danny Holmes completed the comeback on 78 minutes as he took the ball from a short corner and fired past Stech at the second attempt.