Gravitational attraction is inversely proportional to the square of the distance from the center of gravity of a mass. In theory, there is no "cutoff" or "horizon" where the gravitational attraction of, for instance, the sun, will diminish to precisely zero. This in turn means that all of space is subject to the influence of multiple gravitational fields, even though the force exerted by such fields may be imperceptibly tiny.
The apparent lack of gravitation in space is caused by objects in orbit, for instance, being in a state of free fall. In such a state, the forces acting on the object are uniformly distributed over the object's mass. In an orbiting spacecraft, for instance, both the spacecraft and an astronaut inside it are subject to gravity (otherwise they would stop orbiting and fly off in a straight line). However, the force of gravity is acting uniformly on both the spacecraft and the astronaut and so it cannot be sensed -- it is not, for instance, dragging the astronaut in a certain direction, the way gravity drags a person down on earth.
Newton's law of gravitation is universal.
The force F of attraction between two any two bodies of mass M1 and M2 is F = GM1*M2/d^2 , where d is the distance between the bodies. The two bodies has to be in space only.
Space acts as a medium of gravity, but not as source of gravity.
The intesity of gravitational field may vary in accordance with mass and inversely with the square of distance.