Two second-half goals from Marcello Trotta and Alan Judge sealed the win for the League One runners-up.
On loan Trotta struck first in the 77th minute, sliding home Nico Yennaris' low-right wing cross to break the visitors' resolute defence.
Stuart Dallas almost made it two a minute later but his powerful angled drive hit the crossbar.
Brentford gave the scoreline a more realistic look in the 89th minute when Judge skipped on to a Jake Reeves throughball to make it two.
Michael Doughty came closest for the visitors midway through the second half but was denied by a full stretch David Button save.
It was a double celebration at a sell-out Griffin Park crowd as club captain Kevin O'Connor made his 500th appearance for the Bees, coming on to replace Tony Craig after 25 minutes following a clash of heads.
The 32-year-old, who has been with the west London club for 15 years, came on to a standing ovation from all corners of the ground.