The tribunal was needed after the Gills and the Bees were unable to agree on a figure for the transfer, which saw Egan move from Priestfield to Griffin Park in the summer.
On top of the £400k, the Gills will receive £25,000 for every 20 games that Egan plays, up to 80 games, as well as a 20 per cent sell-on fee.
Gillingham, who initially asked for £1m, were due compensation for the Irish defender as he was under 24 when he moved and had been offered improved terms on his expired deal.
He has played already 20 games for the Bees, triggering the first of the £25,000 payments. Forming a centre-back partnership with Harlee Dean, he has also scored three goals, including both in the 2-0 win over Ipswich and a late equaliser at Aston Villa.
Brentford are also still negotiating with Southend over the fee for Daniel Bentley following his summer transfer.