Kenny Jackett's men were the only side in the top five to win on Tuesday allowing them to close the gap between themselves and the Leyton Orient to just three points
James Henry and Leigh Griffiths were the men on target for Kenny Jackett's men as they beat Oldham Athletic 2-0 to close the gap between themselves and the top two to three points.
Leaders Leyton Orient lost their first league match of the campaign, going down 3-1 to Coventry City, who gained their third victory in four games thanks to goals from Carl Baker, Franck Moussa and Leon Clarke, with Yohann Lasimant scoring Orient's consolation.
Peterborough United were held 0-0 by managerless Sheffield United, while Bradford City salvaged a 2-2 draw against Preston North End thanks to Rory McArdle's equaliser 17 minutes from time.
There was late drama at Ashton Gate as all three goals came in the final 11 minutes, Sam Saunders and Clayton Donaldson scoring for Brentford before Marlon Harewood grabbed a consolation at the death.
The defeat keeps Bristol City a point adrift at the bottom after Notts County were also beaten, going down 2-1 to Gillingham, although Tranmere Rovers gained a point against Rotherham United in a 1-1 draw thanks to a Ryan Lowe penalty six minutes from time.
Shrewsbury Town were held 1-1 by Colchester United while three Stevenage goals in the first 20 minutes ensured a 3-0 win against Crewe Alexandra as they moved out of the drop zone thanks to Filipe Morais' brace and a Luke Freeman goal.
Walsall also scored three to beat Swindon Town 3-1 and move sixth. Carlisle United picked up their first win in three league games, courtesy of a Lewis Guy strike, against Milton Keynes Dons, while Crawley Town were beaten for the first time in eight league games.
Louis Dodds, Doug Loft and Ben Williamson got the goals for Port Vale at Crawley as they recovered from back-to-back defeats.