While it's possible that the school balances for gender, it was always roughly equal at my children's GT magnet with a slight overrepresentation of boys. When I asked about that, one teacher suggested that more boys are twice exceptional and have trouble fitting in at regular school and end up at the magnet.