Two goals from Jamie Vardy moved Fleetwood to within two points of league leaders Wrexham as Bath remain without an away win this season.
Fleetwood's Jamie McGuire headed in Jamie Milligan's corner before Vardy got his first with a low shot.
Paul Stonehouse powered home a loose ball to give Bath hope but Gareth Seddon pounced on Ben Swallow's error to restore the hosts' two-goal lead.
Vardy sealed the win in injury-time with a header from Milligan's cross.
Following his hat-trick in the Vardy has now scored five goals in as many days.