The Robins should have gone ahead inside 12 minutes after Tottenham Hotspur loanee Alex Pritchard was fouled in the area by Alan McCormack, but Michael Smith saw the resulting penalty saved by David Button.
Buoyed by the save, the Bees grew into the contest and nearly took the lead on 20 minutes through Jonathan Douglas, whose header cannoned off the crossbar.
Jay McEveley went close for the hosts in the dying stages of the half, before Louis Thompson bettered his teammate's effort. The 19-year-old robbed Douglas of possession before firing past Button on 45 minutes.
The hosts should have doubled their advantage five minutes after the restart through Nathan Byrne, who lifted his effort over the onrushing Button but the ball bounced narrowly wide.
Mark Warburton's charges sought a route back into the contest and would have found one if not for Wes Foderingham, who produced a superb save to deny Marcello Trotta midway through the half.
Brentford's chances of an equaliser dipped when Adam Forshaw was red-carded for two bookable offences in as many minutes as Town held on for the win.
Consequently, Warburton's men sit seven points clear of third-placed Leyton Orient with five games remaining in the race for promotion.