First I will introduce you to the official version. Here it is.
It is well known that the frequency of an atom or a laser (the laser uses a certain atomic frequency) DECREASES in a gravitational field. This is a consequence of the fact that all physical processes SLOW down in a gravitational field. The closer the atom or laser, or an atomic clock, to a massive body (star or planet), the slower the physical processes in them: the frequency of atomic or laser radiations SLOW down, the speed of atomic clocks, respectively, DECREASES.
How is it known?
First, the conclusion about slowing down time and decreasing frequency is the basis of modern theory of gravitation (general theory of relativity). This theory is tested in numerous experiments. In addition, the lowering of an atomic frequency in a gravitational field is a repeatedly verified experimental fact. Experiments have been conducted since the 1960s, beginning with the famous experience of Pound and Rebka.
Here is a picture that clearly illustrates the fact of lowering frequency of an atom (laser) near a huge mass:
The closer a laser to a massive body, the more red is its light. Away from the mass the laser is yellow. If one moves it closer to the mass, it will change its color to orange. Even closer – to red.
Does anyone doubt this? Of course not! This is elementary!
Now, suppose a graduate student approaches his professor and says that he read an article on the Internet about the fact that the laser frequency does not go down, but INCREASES in a gravitational field. Here is this picture:
Close to a large mass, the laser turns from yellow to green, and just next to a large mass it becomes blue.
Looking at this picture, experts in gravity will decide that its author is not in the subject at all. They will not be able to take the picture seriously.
Now I will try to explain clearly why the picture with the reddened laser is erroneous and why it is necessary to draw a conclusion about the blueing of the laser.
So, if we place the source of yellow light in a deep gravitational well (closer to a very massive object), what will we see?
We will see that this source has changed its color from yellow to red. This is a repeatedly verified experimental fact.
Why do I say that the source turned blue?
To better understand my idea, look at the picture. The source of yellow light, shifted to a great depth down, turned blue.
But when this blue light flew out of the potential well, it lost some of its energy, and its frequency decreased noticeably. The light emitted from the potential well turned red.
This is a very important point. Scientists see that the light source has turned red, and they think, “We see that the light source has turned red, then the frequency of the source has decreased in the gravitational field. All is clear”. But they understand nothing. Scientists do not see what color the source really has. They see the reddened light not at the moment of its departure from the source, but only after this light has overcome the gravitational attraction.
As a result, scientists, not at all embarrassed, suggest us to believe in such an absurd picture:
The light source in the gravitational field turns red, but when the light propagates from the source (which is in a deep potential well) to us, nothing happens to it. The light overcomes gravitational attraction WITHOUT LOSING energy.
So, according to the general theory of relativity, the gravitation affects ALL processes. The rate of any process slows down in a gravitational field. But at the same time, the gravitation does not affect the light that comes out of the gravitational field. This interpretation of redshift is generally accepted in modern physics.