The League Two leaders seemed to be heading for defeat despite having most of the play in the second period.
But Dann had other ideas. The 19-year-old picked up the ball in midfield, surged forward, leaving two defenders in his wake, before sending a superb low shot into the bottom corner with goalkeeper Matthew Gilks totally beaten.
The goal made up for a disastrous start by Walsall when their keeper Clayton Ince presented struggling Rochdale with the opening goal in the fourth minute.
Rory Prendergast sent over an in-swinging free-kick from the right and Ince, usually known for his prowess in taking high balls, only succeeded in punching this one into his own net.
Walsall searched for the equaliser and it looked as though it may arrive in the 35th minute.
This time Darren Wrack sent over a dangerous free-kick, but striker Hector Sam headed over from inside the six-yard box.
Walsall manager Richard Money brought on lively winger Ishmel Demontagnac for injured defender Anthony Gerrard straight after half-time.
He also made a double substitution in the 58th minute with Par Cederqvist replacing Sam and winger Mark Wright coming on for Wrack.
Walsall pushed forward almost continually but were unable to trouble Gilks and it was Rochdale who made the better chances.
In the 70th minute Dann came to the rescue when a cross by Glenn Murray looked as though it was going to reach striker Adam Le Fondre but Dann intercepted.
Ince atoned for his earlier error with a fine 73rd minute save from Le Fondre's low shot and four minutes later Le Fondre had another chance but Ince saved again.
The game went deep into added time with Walsall looking set for a defeat before Dann's brilliant goal saved the day.