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 such a path toward the observer, 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.