Gravity wave activity in the lower and middle atmosphere of Mars during the global dust storm of 2018 has been studied for the first time using a high-resolution (gravity wave resolving) general circulation model. Dust storm simulations were compared with those utilizing the climatological distribution of dust in the absence of storms. Both scenarios are based on observations of the dust optical depth by the Mars Climate Sounder instrument on board the Mars Reconnaissance Orbiter. The modeling reveals a reduction of the wave activity by a factor of two or more in the lower atmosphere, which qualitatively agrees with recent observations. It is associated with a decline of gravity wave generation due to baroclinic and convective stabilization of the Martian troposphere induced by the increased amount of airborne aerosols during the storm. Contrary to the decrease of GW activity in the lower atmosphere, wave energy and momentum fluxes in the middle atmosphere increase by approximately the same factor. This enhancement of gravity wave activity is caused by the changes in the large-scale circulation, most importantly in the mean zonal wind, which facilitate vertical wave propagation by allowing for a greater portion of gravity wave harmonics originated in the lower atmosphere to avoid filtering on their way to upper layers.