We study a method to induce resonant transitions between antihydrogen ($bar{H}$) quantum states above a material surface in the gravitational field of the Earth. The method consists of applying a gradient of magnetic field, which is temporally oscillating with the frequency equal to a frequency of transition between gravitational states of antihydrogen. A corresponding resonant change in the spatial density of antihydrogen atoms could be measured as a function of the frequency of applied field. We estimate an accuracy of measuring antihydrogen gravitational states spacing and show how a value of the gravitational mass of the $bar{H}$ atom could be deduced from such a measurement. We also demonstrate that a method of induced transitions could be combined with a free-fall-time measurement in order to further improve the precision.