We report on Hubble Space Telescope (HST) observations of the late-time afterglow and host galaxy of GRB 021004 (z = 2.33). Although this gamma-rayburst (GRB) is one of the best observed so far in terms of sampling in the time domain, multi-wavelength coverage and polarimetric observations, there is large disagreement between different measurements and interpretations of this burst in the literature. We have observed the field of GRB 021004 with the HST at multiple epochs from 3 days until almost 10 months after the burst. With STI S prism and G430L spectroscopy we cover the spectral region from about 2000 Angstrom to 5700 Angstrom corresponding to 600 1700 Angstrom in the rest frame. From the limit on the flux recovery bluewards of the Lyman-limit we constrain the H I column density to be above 1 x 1018 cm-2 (5 sigma). Based on ACS and N ICMOS imaging we find that the afterglow evolved a chromatically within the errors (any variation must be less then 5%) during the period of HST observations. The color changes observed by other authors during the first four days must be related to a 'noisy' phenomenon superimposed on an afterglow component with a constant spectral shape. This also means that the cooling break has remained on the blue side of the optical part of the spectrum for at least two weeks after the explosion. The optical to X-ray slope OX is consistent with being the same at 1.4 and 52.4 days after the burst. This indicates that the cooling frequency is constant and hence, according to fireball models, that the circumburst medium has a constant density profile. The late-time slope of the light curve (alpha 2, F nu proportional to t-alpha2) is in the range 2 = 1.8-1.9, although inconsi stent with a single power-law. This could be due to a late-time flattening caused by the transition to non-relativistic expansion or due to excess emission (a 'bump' in the light curve) about 7 days afterburst. The host galaxy is like most previously studied GRB hosts a (very) blue starburst galaxy with no evidence for dust and with strong Ly emission. The star-formation rate of the host is about 10 M solar mass yr-1 based on both the stre ngth of the UV continuum and on the Ly alpha luminosity. The spectral energy distribution of the host implies an age in the range 30-100 Myr for the dominant stellar population.