A gravitational redshift is a redshift due to the source being near a massive object (rather than due to a relative radial velocity between observer and the source). Instead of slowing down, as would a massive object following that path, electromagnetic radiation redshifts. Higher mass and density increase the effect and black holes, neutron stars, and galaxy clusters can produce a significant redshift. Stars can produce a significant redshift in their own spectral lines.
A measured redshift can be useful observation data, e.g., to help determine the mass of an object, or to detect and analyze the implications of the Sachs-Wolfe effect.