  The detection of a dust disc around G29-38 and transits from debris orbiting
WD1145+017 confirmed that the photospheric trace metals found in many white
dwarfs arise from the accretion of tidally disrupted planetesimals. The
composition of these planetesimals is similar to that of rocky bodies in the
inner solar system. Gravitationally scattering planetesimals towards the white
dwarf requires the presence of more massive bodies, yet no planet has so far
been detected at a white dwarf. Here we report optical spectroscopy of a
$\simeq27\,750$K hot white dwarf that is accreting from a circumstellar gaseous
disc composed of hydrogen, oxygen, and sulphur at a rate of
$\simeq3.3\times10^9\,\mathrm{g\,s^{-1}}$. The composition of this disc is
unlike all other known planetary debris around white dwarfs, but resembles
predictions for the makeup of deeper atmospheric layers of icy giant planets,
with H$_2$O and H$_2$S being major constituents. A giant planet orbiting a hot
white dwarf with a semi-major axis of $\simeq15$ solar radii will undergo
significant evaporation with expected mass loss rates comparable to the
accretion rate onto the white dwarf. The orbit of the planet is most likely the
result of gravitational interactions, indicating the presence of additional
planets in the system. We infer an occurrence rate of spectroscopically
detectable giant planets in close orbits around white dwarfs of
$\simeq10^{-4}$.
