Goals from Ben Strevens, Charlie MacDonald (2) and Myles Weston (2) saw the Bees safely through to a home meeting with Walsall on Saturday week.
Stevens broke the deadlock three minutes before the break when he pounced on a loose ball in the box to smash home his first goal in a Brentford shirt.
Strike partner MacDonald then doubled the hosts’ lead on the stroke of half-time when he converted Cleveland Taylor’s cross.
Brentford had a scare when Graeme Armstrong pulled one back for the visitors just before the hour mark, but MacDonald extinguished any hope of a shock with his second two minutes later.
Weston got in on the act with a 25-yard screamer and then a tap-in, before Armstrong grabbed his second goal of the game to restore some pride for Gateshead late on.