The detection1 of a dust disk around the white dwarf star G29-38 and transits from debris orbiting the white dwarf WD 1145+017 (ref. 2) confirmed that the photospheric trace metals found in many white dwarfs3 arise from the accretion of tidally disrupted planetesimals4. The composition of these planetesimals is similar to that of rocky bodies in the inner Solar System5. Gravitational scattering of planetesimals towards the white dwarf requires the presence of more massive bodies6, yet no planet has so far been detected at a white dwarf. Here we report optical spectroscopy of a hot (about 27,750 kelvin) white dwarf, WD J091405.30+191412.25, that is accreting from a circumstellar gaseous disk composed of hydrogen, oxygen and sulfur at a rate of about 3.3 × 109 grams per second. The composition of this disk is unlike all other known planetary debris around white dwarfs7, but resembles predictions for the makeup of deeper atmospheric layers of icy giant planets, with H2O and H2S being major constituents. A giant planet orbiting a hot white dwarf with a semi-major axis of around 15 solar radii will undergo substantial evaporation with expected mass loss rates comparable to the accretion rate that we observe onto the white dwarf. The orbit of the planet is most probably the result of gravitational interactions, indicating the presence of additional planets in the system. We infer an occurrence rate of approximately 1 in 10,000 for spectroscopically detectable giant planets in close orbits around white dwarfs.