This suite of three pieces for piano was inspired by the prose poems of Aloysius Bertrand (1807 - 1841), which were first published posthumously in 1842 under the title Gaspard de la nuit: fantaisies à la manière de Rembrandt et de Callot; they are works of an intense romanticism, fascinated by the mediaeval and the mysterious. Ondine is a water-nymph who seeks a mortal spouse in vain before disappearing in a spray of water drops. Le Gibet depicts an eerie scene at sunset as the corpse of a hanged man swings to and fro on the gibbet. Scarbo is the malevolent gnome who appears in the middle of the night furiously spreading fear and disorder.
Ravel was first introduced to the work by his friend, the pianist Ricardo Viñes who subsequently gave the work's first performance in Paris on 9 January 1909.
Ravel said that his intention had been "to write piano pieces of transcendental virtuosity which are even more complicated than [Balakirev's] Islamey". (Roland-Manuel  p.54.) Speaking of the third movement Scarbo, he told a pupil, "I wanted to make a caricature of romanticism, but perhaps I let myself be taken over by it." (Perlemuter  p.35). His friend Hélène Jourdan-Morhange was struck however by the classical form to be found in the work: "The three poems chosen by Ravel are quite dissimilar, but because of their perfect musical realisation, they seem to have been intentionally gathered together by the poet. The structure is almost that of a sonata: Allegro, Adagio and a dazzling Finale". (Perlemuter  p.31).
The complete French text of the poems can be found on the French Wikisource site. (Ondine appears in Livre 3, no.9; Le gibet in the "pièces détachées" at the end; and Scarbo in Livre 3, no.2 and in "pièces détachées").
A performance of the second movement, Le gibet, is included among the piano roll recordings which Ravel made in 1922.