Flow blockage by large wind farms leads to an upward displacement of the boundary layer, which may excite atmospheric gravity waves in the free atmosphere and on the interface between the boundary layer and the free atmosphere. In the current study, we assess the sensitivity of wind-farm gravity-wave excitation to important dimensionless groups and investigate the feedback of gravity-wave-induced pressure fields to wind-farm energy extraction. The sensitivity analysis is performed using a fast boundary-layer model that is developed to this end. It is based on a three-layer representation of the atmosphere in an idealised barotropic environment, and is coupled with an analytical wake model to account for turbine wake interactions. We first validate the model in two-dimensional mode with data from previous large-eddy simulations of ‘infinitely’ wide wind farms, and then use the model to investigate the sensitivity of wind-farm-induced gravity waves to atmospheric state and wind-farm configuration. We find that the inversion layer induces flow physics similar to shallow-water flow and that the corresponding Froude number plays a crucial role. Gravity-wave excitation is maximal at a critical Froude number equal to one, but the feedback on energy extraction is highest when the Froude number is slightly below one due to a trade-off between amplitude and upstream impact of gravity waves. The effect of surface friction and internal gravity waves is to reduce the flow perturbation and the related power loss by dissipating or dispersing perturbation energy. With respect to the wind-farm configuration, we find that gravity-wave-induced power loss increases with wind-farm size and turbine height. Moreover, we find that gravity-wave effects are small for very wide or very long wind farms and attain a maximum at a width-to-depth ratio of approximately $3/2$ .