Jordan Johnson had put the Blues ahead on 34 minutes from the penalty spot but Carlton levelled 60 seconds later when Alexander Troke headed home a Ben Flynn cross.
Troke then scored with a stunning half-volley from the touchline to give the Millers the lead before John Johnstone saw a long range effort hit the crossbar.
Johnson equalised on 62 minutes slotting home after finding himself in acres of space, and Ben Mills won it for the visitors - their first ever win at Carlton - when he put Johnson's cross past Jonathon Viscosi.
This was a fourth defeat in succession for 10th-placed Carlton, who face league leaders Halesowen on Saturday, while Leek play Coalville in a crucial game at the top of the table.