Tranmere took the lead after 11 minutes when Chris Shuker collected a Craig Curran pass and skipped his way through the defence before firing home.
Walsall should have been level on 24 minutes but Darren Byfield headed wide at the far post from an Alex Nicholls cross. Byfield made amends after 45 minutes, though, as he tapped home after Luke Daniels failed to deal with Richard Taundry's powerful drive.
Walsall moved ahead 60 seconds after the break when Troy Deeney slotted home beyond substitute keeper Joe Collister after a Byfield cross rebounded off Ian Goodison.
The see-saw nature of the game continued as Tranmere got back on terms after 61 minutes, with a fine angled strike from Alan Mahon creeping in after appearing to take a deflection off substitute Kithson Bain.
But Deeney won it for Walsall with a close-range finish seven minutes from the end after a fine run and cross by Nicholls.