After Albert Einstein published his paper, On The Electrodynamics of Moving Bodies, in 1905, which explained his Special Theory of Relativity, he then wanted to also explain relative acceleration. He first used gravity to explain how acceleration is also relative, just as he explained how speed is relative if a fast moving spaceship is observed by a stationary observer. His explanation was based on the fact that gravity causes greater acceleration of a falling body as the falling body approaches a large mass (e.g. earth). Gravity's acceleration at the earth's surface is about 32 feet per second per second, and it decreases going away from earth. So this difference in acceleration at different distances from a large mass (earth) is ALSO relativistic, just as in Einstein's Special Theory of Relativity. But gravity is a very weak force, and so is the change in gravity's acceleration of mass over distance. The change is VERY small. But it exists.
It then follows that if mass causes different accelerations in falling bodies at different distances from that mass, and given that the speed of light is absolutely constant (in a vacuum, like space), then only changes in both space and time can account for the difference in acceleration of a falling body caused by a large mass. The concept was simple, but the mathematics that showed how it worked wasn't. He didn't publish his paper, The Foundation of the General Theory of Relativity, until 1915. He didn't want to say that space and time changed because of the effect of mass, he preferred to say that the combination of space and time, spacetime, changed (in a 4-dimensional equation). This allowed all areas of space and time to remain the same, but each area might be more "curved" than other parts due to gravitation effects.
This 4-dimensional increased curving caused by the effect of mass is equivalent to a decrease in the "metric" of space and a slowing of time, which is how I prefer to think of it. The "metric" of space can be considered as 3-dimensional grid lines overlying the vacuum of space. These theoretical grid lines expand or contract with changes in gravitational effects, and can be considered as the measurements of the distance between objects in space. This way of visualizing the effect of mass on space and time especially makes sense since we can measure a difference in time between a clock on an orbiting space station and a clock on earth. Therefore if time by itself is changed by the effect of mass, then "space" (or the "metric" of space) by itself must also be changed by the effect of mass. I should add that the effect of the speed of the space station in orbit has been removed from the effect of gravity in the change in their clock.