The Brewers started the match on the back of five wins in six games but struggling Aldershot shocked them when they took a third-minute lead, Paul McCallum slotting home.
The visitors equalised a minute before half-time through Robbie Weir and then went ahead midway through the second half via Michael Symes' shot into the top left-hand corner.
Victory was enough to see them leapfrog Port Vale and go within five points of leaders Gillingham who drew 0-0 at seventh-placed Exeter.
The Valiants went down to a surprise 2-0 reverse at Bristol Rovers.
Ryan Brunt headed Rovers ahead when he nodded Oliver Norburn's cross down into the net in the seventh minute.
He then got his second seven minutes before half-time when he volleyed home.
Kelvin Langmead scored with a minute to go as Northampton drew 1-1 at Morecambe.
Northampton started the game just a point outside the top three but it was the hosts who went ahead through Jack Redshaw (57) before Langmead's late intervention.
Rotherham moved up one place to fifth despite conceding a late goal in a 2-2 draw at Wycombe.
The Chairboys went ahead, Joel Grant firing high into the net from close range after just six minutes.
Daniel Nardiello, though, scored twice to put the Millers ahead but Gary Doherty headed home from close range to level.
Fleetwood are five points off the play-offs in eighth after a Jon Parkin hat-trick guided them to a 3-0 win at Accrington who dropped to bottom of the Football League.
Michael Raynes scored in the fifth minute of injury time to give Oxford a 1-0 win over Barnet to move up to ninth, one ahead of Southend who lost 3-1 at home to AFC Wimbledon.
Sean Clohessy fired home a spot-kick high into the goal for the Shrimpers in the 29th minute, a lead that lasted only three minutes when Pim Balkestein headed home.
And Wimbledon turned the game on its head shortly after the resumption through Jack Mifsud's bullet header.
Luke Moore got a third with a low drive less than two minutes after coming on as a substitute.
Ten-man Torquay rescued a brave 2-2 draw at Dagenham & Redbridge in their battle against relegation.
With just two minutes gone Aaron Downes' challenge on Abu Ogogo in the area saw the hosts awarded a penalty and Torquay reduced to 10 men.
Medy Elito fired the spot-kick high into the net but Joss Labadie levelled with 20 minutes left.
Josh Scott restored Dagenham's lead five minutes from time but the Gulls fought back to claim a draw with a Rene Howe penalty in the 88th minute.
York against Rochdale and Plymouth's game with Bradford both ended goalless.