We present a method to measure the resonance transitions between the gravitationally bound quantum states of neutrons in the GRANIT spectrometer. The purpose of GRANIT is to improve the accuracy of measurement of the quantum states parameters by several orders of magnitude, taking advantage of long storage of Ultracold neutrons at specula trajectories. The transitions could be excited using a periodic spatial variation of a magnetic field gradient. If the frequency of such a perturbation (in the frame of a moving neutron) coincides with a resonance frequency defined by the energy difference of two quantum states, the transition probability will sharply increase. The GRANIT experiment is motivated by searches for short-range interactions (in particular spin-dependent interactions), by studying the interaction of a quantum system with a gravitational field, by searches for extensions of the Standard model, by the unique possibility to check the equivalence principle for an object in a quantum state and by studying various quantum optics phenomena.