According to the general theory of relativity , the gravitational attraction between masses results in the masses in space and time , meaning that every object is attracted to each other , and that results in space and time . According to general relativity , the observed gravitational attraction between masses results from the warping of space and time by those masses .