This takes us into the realm of Einstein's general theory of relativity. The mass of the photon isn't attracted to the star's mass under Einstein's theory. Rather, the star's mass distorts space and the photon's path changes because the space is curved, says Paul Hewitt in his book Conceptual Physics . General relativity uses a geometry that is extremely difficult for we humans who live in three-dimensional space to visualize. This geometry describes not only a curved space but also a curved time .
Gravity is nothing but the bumps, depressions, and warpings of geometrical space-time.
Boris Starosta, Meta Research Gravity warped space imagined in two dimensions. The more massive the ball, the more it dents or warps the bed. Roll a marble across the bed, well away from the bowling ball. It rolls along a path that's pretty straight. Now, roll the marble across the bed but nearer the bowling ball.