After being held to a 1-1 draw in the first match, League Two Dagenham - who have lost their last seven league games - made the breakthrough through Brian Woodall's header on 20 minutes.
But the Romans drew level via Adam Connolly's stunning strike on 71 minutes before Nurse struck in both halves of extra time to seal a much-needed victory for John Still's men.
Dagenham had gone in front when Woodall climbed above the home defence to head home a right-wing cross from Richard Rose.
Bath were unlucky not to equalise after 35 minutes when former Bristol City midfielder Joe Burnell got a touch to Alex Russell's inswinging free-kick, only to see his glancing header hit the far post.
But Bath did hit back on 71 minutes when midfielder Connolly let fly from 25 yards and saw his well-struck shot rocket past Daggers goalkeeper Chris Lewington.
Nurse, however, had the final say, although his first effort had a suspicion of offside on 100 minutes as he latched onto a long clearance before slotting home a second as Bath threw men forward.
Walsall also needed extra time before winning the all-League One replay against Exeter City 3-2.
Richard Logan fired the visitors ahead just before half-time but two quickfire goals from Jon Macken and Alex Nicholls put the home side in front.
Elliott Frear's 77th-minute strike forced the game into an additional 30 minutes, and midway through the first period George Bowerman scored from close range to send the Saddlers into the second round.