According to what Feynmann says and according to what is reported here http://hyperphysics.phy-astr.gsu.edu/hbase/relativ/gratim.html
about the experiment of Pound and Rebka, the gravitational redshift is :
it is part of general relativity but can be derived classically. A Photon is attracted like a mass by the gravitational field with g acceleration this way it loses its energy, coming out of a celestial body.
the link to time dilation doesn't really come to a redshitf of photons.
here we are talking about frequency shift due to different gravity fields beating different times.
With gravitational redshift described in the first instance, the gravity field is not necessarily variable (is considered constant as g).