Batty opened the scoring just before the break when his first-time strike flew into the bottom corner.
Charlie Mulgrew poked home from close range on his return to Highbury to level before Josh Vela scored the winner in the dying stages.
Dundee United had a bright start and created the first chance inside the opening couple of minutes.
Our best fan pictures from Blackpool's penalty shootout defeat to Barrow
Carabao Cup second round draw details revealed as Everton, Leeds United, Newcastle United prepare to enter the competition
Michael Appleton and Kieran McKenna comment on Richard Keogh's imminent move from Blackpool to Ipswich Town
How Blackpool's players rated during cup humbling at the hands of Barrow
Too early to be making judgements after Blackpool's cup upset, but red flags can't be ignored
Steven Fletcher picked up the ball just inside the area but dragged his shot wide of Jay Lynch’s goal.
Fleetwood responded after that early scare as a Danny Andrew corner was headed into the danger area by Toto Nsiala, but Brendan Wiredu fired over from close range.
Ellis Harrison then rose highest to flick the ball into the path of Shayden Morris, who cut inside from the left before unleashing a strike that was saved by Mark Birighitti.
Town broke the deadlock in the 42nd minute after Andrew’s initial corner had caused chaos in the penalty area.
Harrison forced a diving save from the Terrors’ keeper but the ball was only half-cleared and Batty struck it on the half-volley into the bottom corner.
After a slow start to the second period, the visitors had a chance to equalise after a slip from Nsiala.
Both Fletcher and Anthony Watt had the chance to shoot but were dispossessed by Wiredu before Fleetwood got the ball to the other end, where Harrison was unable to squeeze the ball home.
Former Town centre-back Mulgrew then levelled the score in the 66th minute, sidefooting home after Dylan Levitt had crossed the ball into the box.
The match started to fizzle out in the latter stages but, with just two minutes left on the clock, Cian Hayes laid off the ball for Vela who slotted it into the corner.
Fleetwood Town: Lynch, Andrew, Wiredu, Morris (Hayes 77), Vela, Harrison (Omochere 67), Lane (Garner 77), Holgate, Nsiala, Batty, Johnston.Subs not used: Donaghy, Boyle, Baggley, Earl.
Dundee United: Birighitti, Smith, McMann, Mulgrew (Graham 70), Fletcher (Niskanen 60), Edwards, Sibbald (Clark 60), Levitt (Meekison 76), Harkes, Cudjoe (Chalmers 81), Watt (Freeman 60). Subs not used: Eriksson, Macleod.
Referee: Ben Toner.