Leam Richardson scored the first Accrington goal to halt a run of three successive home defeats as Brentford were narrowly overcome 1-0.
The ex-Bolton defender looped in a cross to the far post which evaded everyone, skimmed the bar and banged in to the net on 31 minutes.
It was what relegation-threatened Accrington deserved as they created the better chances.
Brentford keeper Ben Hamer had to be at his best to push out an Andy Mangan strike and hit a Paul Mullin volley wide.
Hamer did fumble an Ian Craney shot on 80 minutes but Mullin ballooned over the empty goal.
Brentford rarely troubled Stanley keeper Kenny Arthur as they slipped to their second successive defeat to hinder their play-off chase.