Elder nodded home from six yards in the 29th minute after on-loan winger Dean Bowditch had done superbly well to keep the ball alive after Ryan Dickson’s driven free-kick.
The visitors could have gone ahead as early as the eighth minute when Charlie MacDonald seized upon Ian Roper’s slip only for Conrad Logan to produce a smart block.
MacDonald then flashed an effort just wide from 20 yards in the 24th minute after being first to a long clearance from goalkeeper Ben Hamer.
Luton livened up after the interval and went close through long-range efforts from Paul McVeigh and Asa Hall. But Brentford always looked dangerous and Logan had to be at full stretch to keep out Bowditch’s low 25-yard drive after 63 minutes.
Captain Keane was controversially red carded five minutes from time for bringing down MacDonald even though there appeared to be covering players.