The Standard Model of particle physics successfully describes three of the four fundamental forces in physics. Only gravitation, which is comparatively weak, eludes a quantum mechanical description as well as an embedding into the Standard Model. Although general relativity is a successful description of gravitation and a cornerstone of modern cosmology, new questions arise by strong indications of the existence of dark energy and dark matter. Due to their small electrical polarisability and their vanishing electrical charge, neutrons represent excellent test particles to test gravitation at short distances: Ultracold neutrons can form bound states in the gravity potential of the Earth. These states are formed due to quantum mechanics and are non-equidistant. Therefore, spectroscopic methods are applicable. The qBounce experiment takes advantage of this feature to measure the eigenenergies of the ultracold neutrons very precisely. Rabi-like spectroscopic methods have been realised in previous qBounce experiments, which lead for example to limits on dark energy and dark matter models that would alter the eigenenergies of the neutrons. This thesis presents the next logical step to further increase the precision of qBounce experiments: The realisation of Norman F. Ramsey's method of separated oscillatory fields applied to quantum mechanical states of neutrons in the gravitational field of the Earth. In addition, the experiment presented is (to the author's best knowledge) the first realisation of Ramsey's method that is not based on electromagnetic interaction but purely on mechanical oscillations. Due to the extension from a Rabi-like to a Ramsey-like setup and the increased required space, a whole new instrument was developed. The Ramsey experiment, consisting of five aligned neutron mirrors, was planned, constructed, and put into operation. The first proof of Ramsey's method with gravitationally bound, ultracold neutrons and mechanically oscillating neutron mirrors succeeded.