You are correct, light moves in the time dimension with speed 0 and in the space dimension with speed c when:
Now, you are asking why light is then affected by time dilations.
Now the answer is local measurement. When you do a measurement from far away, you might get a speed different from c (yes, even more then c is possible), because:
time dilation is caused by the difference between the stress energy (it is a misconception that gravity is caused by mass, in reality it is caused by stress-energy) at two points in space
when you do a measurement from a far away point, the point where you are (the observer) might have a different strength (stress-energy) gravitational zone, then the space point where you actually measure the speed of light
Now, you need the learn about the four vector. You have to accept that the four vector is set up so, and the universe is set up so, that the magnitude of the four vector needs to be c always. Now light moves in the time dimension with speed 0 as you say. And it moves in the spatial dimentisons with speed c.
But this is only true for local measurements in vacuum.
Here I have to add a note based on the correct comments, because the four velocity vector of photons (with no rest mass):
The four-velocity defined here using the proper time of an object does not exist for world lines for objects such as photons travelling at the speed of light
Now to make the explanation a little bit easier, I am using an example for photons with four velocity vectors and changing time components in gravitational fields, that would make it seem like the photon could behave as if its four velocity would be changing only when viewed from far away (Earth), where the stress-energy is different then the place where the photon is actually passing by the Sun. But in reality you have to use an affine parameter for a photon's four velocity vector instead of proper time. This is because dτ=0 for a photon. The affine parameter is a scalar and is invariant under Lorentz transformations.
AS soon as you make a measurement from far away, gravity (the difference of the gravitational field between where light passes and where you make the measurement from) will cause time dilation, and that will mean that the gravitational zone will cause time to seem to pass slower next to the Sun where light passes (relatively compared to a clock on Earth). Now the four vector's magnitude needs to be a constant always, and light seems (in reality it does not) to have started to move in the time dimension (it seems to start to experience time as we do). In reality light does not move in the time dimension, but because of the difference between the stress-energy at the Sun and Earth, time dilation will cause clocks at the Sun to seem to tick slower then clocks at Earth. Thus, light will have to seem to slow down in the spatial dimensions, the spatial dimensions will have to compensate to keep the magnitude of the four velocity vector constant.
Please see here:
Now in the Shapiro effect, you are asking whether the time dilation or the curvature component is more dominant.
The answer is that the time dilation component is more dominant, and the curvature component is very little.