If photons don't experience time, does that mean time is a consequence of mass?
To me that's a profound conclusion yet not one I see printed.
If there were just massless fields (particles), it would still be the case that spacetime has 1 temporal and 3 spatial dimensions so, in this sense, time exists independently of mass.
However, as Sir Roger Penrose has pointed out in his work on the Conformal Cyclic Cosmology (CCC), when there are just massless (conformally invariant) entities, there is no way to 'build a clock' (or a ruler) and so the universe 'loses track of time' (and distance too).
From Before the Big Bang: An Outrageous New Perspective and its Implications for Particle Physics
Physically, we may think that again in the very remote future, the universe “forgets” time in the sense that there is no way to build a clock with just conformally invariant material. This is related to the fact that massless particles, in relativity theory, do not experience any passage of time. We might even say that to a massless particle, “eternity is no big deal”.
I'm not sure where you're at in your studies, but you shouldn't accept anything as true just because it's in a book. You should convince yourself of it beyond any reasonable doubt. In the words of Boyle, "nothing by authority."
This is related to this question, but I do not suspect the OP here will get much from the solution there, so I reword it more simply:
In special relativity, light rays (or just call them photons) are called "null observers." Null observers, by definition, have no proper way of measuring time intervals. Conceptually, one measures time intervals in relativity by sending light signals between frames - but if you are traveling at light speed then that measurement is useless. Mathematically, the proper time of an ideal clock between $t_{o}$ and $t_{1}$ is given by,
$$ \int_{t_{o}}^{t^{1}} \Bigg(1 - \frac{v^{2}}{c^{2}}\Bigg)^{1/2} dt = \int(0) = 0$$
since $v = c$ for null observers.
Perhaps this also helps for understanding "why null observers?"
If photons don't experience the passage of time because they have no mass, is it fair to say the property of time is a consequence of having mass?
I think it's more correct to say that they do not "pass time" because they are traveling at light speed, and they travel at light speed by definition. There is a very interesting article here about why photons have zero rest mass.
is it fair to say the property of time is a consequence of having mass?
Yes, it is fair to say that as long as you are specifically speaking of proper time (which seems reasonable to say when speaking of “the property of time”).
Proper time is an affine parameter for timelike worldlines, and only massive objects have timelike worldlines. Massless objects do have affine parameters, but they are not proper time.