Ethan Pinnock’s 85th-minute header secured Brentford a sixth successive league win, closing the gap on the top two in the table.