Not really. Just do something like with docking modules - check ship size.
When the ship is above 0.8* a gates loop size, energy costs could increase exponentially for a soft-cap near the size limit.
Ships which are just tall with almost no mass for their vertical size could still use the gate...