To think about this, first we need to think about what we mean by time passing. A good way is consider some regularly repeating process, such as an object undergoing simple harmonic motion. We count the number of oscillations of the object, between two events nearby that are of interest to us, and this count gives a measure of the amount of time that has passed. In fact the standard of time, based on caesium atomic clocks, uses this principle. The oscillation is the oscillation of the nucleus of a caesium atom relative to the electrons. It oscillates 9192631770 (that's about 9 billion) times per second.
Now let's think about one of the properties of gravity: as things move upwards in a gravitational field, they lose kinetic energy. In the case of light waves this means that a wave emitted with a certain frequency at a low down place will arrive at a high up place with a lower frequency.
Now consider the waves emitted by a caesium atom. We start with a pair of caesium atoms at a high up place. They are emitting microwaves all the time, with the frequency 9 GHz. We leave one of them where it is, and take the other on a journey. The latter one is first lowered down to a low place in a gravitational field and then held there for a while. While it is there it keeps emitting waves. Let's say it makes $4.5$ billion oscillations, emitting that number of oscillations of the electromagnetic field near to it. These waves propagate up to the upper atom, and they arrive there with a lower frequency because of the loss of potential energy. Let's say this frequency change is by a factor 2, just to have a concrete example. It means that the waves arriving at the high up place (after being emitted low down and travelling upwards) have twice the wavelength, when they arrive, of the ones emitted locally by the atom at the high up place. Therefore they also have twice the period. So in the time taken for the $4.5$ billions wavelengths to arrive, the upper atom oscillates $9$ billion times. So a person at the upper atom will consider that 1 second has passed, because that is how long it takes a caesium atom to oscillate $9$ billion times. But, according to what has been observed, the lower atom has only oscillated $4.5$ billion times. How are we to interpret that?
We do another experiment, starting with the same two atoms, and sending one on a journey to the same low-down place as before. Now we let it stay there for longer, say while it oscillates 18 billion times. The waves propagate upwards as before, losing energy as they go and consequently also getting a longer wavelength and a longer period. For the two places we are considering, this change is by a factor 2. It means that the waves arrive at the upper atom with a period twice that of the upper atom, so now the upper atom will oscillate 36 billion times while the waves arrive. That will take 4 seconds. But during those 4 second the lower atom has only oscillated 18 billion times.
I hope you are beginning to get the picture: as far as the upper atom is concerned, what is happening at the lower atom is going more slowly.
But is this a property of just these two atoms? Well according to gravitational physics, the physics at any given place is just the same, so if one atom is going slowly at some location, then so are other atoms, and molecules, and solids, and everything at that location. Relative to other things right at that location, all the processes have their usual rates relative to one another, but relative to processes at another location (one high up in the gravitational field) they are all going slowly.
The example I gave, with a factor 2, is a rather extreme example. You can only get gravitational time dilation as large as that from things like neutron stars and black holes.
The original question was why does this happen. So far in my answer I have simply said that it is connected to another fact: the fact of red-shift as electromagnetic waves (or any waves) climb out of a potential well. I have shown that these two observations are not just mutually consistent, but really two things that go together; they each imply the other. That is all we can ever do in physics: show how phenomena are connected. The ultimate answer to why gravity causes time dilation is to turn the statement around and say that the phenomenon of a spatially-dependent time dilation is the very thing we call gravity. One can support such a statement by adding some further aspects of the physics and mathematics, and especially important is the fact that things move so as to take the most time to get from one event to another. For this reason a spatially-dependent time dilation will cause the trajectories to curve in interesting ways, and this is what we call gravitational acceleration.
In the last paragraph above I have simplified a little, but a more precise statement would need a longer answer and this answer is already long enough!