After an even start, Tranmere's Adam McGurk had the first effort on target in the 20th minute but goalkeeper Simon Eastwood turned it round the post.
The league leaders took control with Liam Palmer bringing a diving block from defender Richard Rocha before Eastwood superbly tipped over Andy Robinson's curling effort.
The breakthrough arrived after 31 minutes as defender Ash Taylor rose to head in McGurk's pin-point cross from the right.
Boosted by the goal, Tranmere continued to press before the break and Eastwood had to rush out to clear his lines with Jake Cassidy looking to get in.
Portsmouth rallied after the interval and were level within five minutes of the restart as defender Gabor Gyepes headed home at the back post following Brian Howard's free-kick.
Rovers responded positively and restored their advantage in the 74th minute as on-loan Bolton striker Michael O'Halloran headed in Robinson's cross from the by-line.
But with home fans still celebrating, substitute Jake Jervis - who spent a month on loan at Prenton Park earlier in the season - equalised with a delightful curling effort.
Both sides pushed for the winner, with Palmer going closest only for Eastwood to save with his feet after the midfielder burst into the box.