Ever since the discovery of the first exoplanet, astronomers have made steady progress towards finding and probing planets in the habitable zone of their host stars, where the conditions could be right for liquid water to form and life to sprawl. Results from the Kepler mission indicate that the occurrence rate of habitable-zone Earths and super-Earths may be as high as 5-20%. Despite this abundance, probing the conditions and atmospheric properties on any of these habitable-zone planets is extremely difficult and has remained elusive to date. Here, we report the detection of water vapor and the likely presence of liquid water clouds in the atmosphere of the 8.6 M$_\oplus$ habitable-zone planet K2-18b. With a 33 day orbit around a cool M3 dwarf, K2-18b receives virtually the same amount of total radiation from its host star ($1441\pm80$ W/m$^2$) as the Earth receives from the Sun (1370 W/m$^2$), making it a good candidate to host liquid water clouds. In this study we observed eight transits using HST/WFC3 in order to achieve the necessary sensitivity to detect water vapor. While the thick gaseous envelope of K2-18b means that it is not a true Earth analogue, our observations demonstrate that low-mass habitable-zone planets with the right conditions for liquid water are accessible with present-day telescopes.