Does Gravity Depend on Spatial Dimension? Consider a line containing two point masses, $m$ and $M$. The line is a $1D$ space.
What's the gravitational force between the two masses? 
Newton's formula for the gravitational force $F$ between two masses $m$ and $M$ in 3D space is
$$F=\frac{G M m}{r^2}$$
where $G$ is a constant and $r$ is the distance between the two masses.
The $r$ term is good in a $3D$ space, but in general it's $r^{n-1}$ where $n$ is the dimension of the space. So putting $n=1$ for $1D$ space we get
$$r^{1-1}=r^0=1 \Rightarrow F=GMm \, ,$$
Which means $F$ is independent of distance. Gravity has the same strength no matter how far apart the two objects are!
Of course, this calculation uses Newton's theory of gravity. Perhaps General Relativity would give a different result.
 A: The reason why the gravitational force is in $r^{-2}$ is because it has zero divergence in void — its flux is conserved through a close surface encompassing matter is conserved.
Let's take the example of a massive point, the flux of the gravitational force through a sphere of radius $r$ centered on the point is:
$$ \Phi = \iint\mathbf{F} \mathrm{d}\mathbf{S}.$$
If we assume that the force is isotropic (independent of the direction), then the equation is only:
$$ \Phi = F \iint \mathrm{d} S,$$
which is the norm of the force times the surface of a sphere in $n$ dimensions.
So in 3D we have $\Phi \propto F r^2$ hence $F \propto r^{-2}$ and in $n\geq 1$ dimensions, $F \propto r^{n-1}$.
Now the case of one dimension is similar: a sphere in one dimension is defined by two points located at $\pm r$. Because the force is isentropic,
$$\int_\mathrm{1D}\mathbf{F}\mathrm{d}\mathbf{S} = F(+r) + F(-r) = 2 F(r).$$
The conservation of the flux is then: 
$$ \forall r\in\mathbb{R}, \quad 2F(r) = \Phi$$
So you are correct to say that the gravitational force is independent of distance in a 1D universe!
If you want to overcome this issue of infinitely propagating foce, you have to take into account the time it takes for the force to propagate and you should use general relativity and eventually cosmology (with expanding universe).
A: There is nothing in Newton's laws that restricts the force of gravity to behave as $\propto r^{1-D}$.
Yes, if you imagine the gravitational vector field to be like the velocity field of flowing water, then it should have zero divergence, and that indeed implies $\propto r^{1-D}$ behavior, including the constant $D=1$ behavior that you mentioned.
So $r^{1-D}$ behavior implies zero divergence and vice versa, but there's no way in Newtonian mechanics to prove either from Newton's laws. That's why Newton had to use experimental data to get the correct force law! If it was discovered that the three dimensional force law was like $e^{-r}$, Newtonian mechanics would chug along just fine!
Quantum field theory and general relativity change the picture, giving strict conditions on the force behavior as consequences.
A: Yes, it depends on the spatial dimensions, as discussed above. This has implications for the physical theories that claim that spacetime is higher dimensional than 4 (and space more than 3). This is to tell you something about the consequences and implications of higher dimensions for gravity.  
In fact, for n (spatial) dimensions the force would decrease as $1/r^{n-1}$, with r the distance, as noted in the answer by @ccc. No problem. But that also indicates that as r becomes smaller, the force of gravity can be stronger, at least relatively speaking. Simplistically, if you take $F = k/r^{n-1}$, for two given masses, then we have, for n = 3, n= 4, and n = 10 respectively (and doing it in arbitrary units), 
*FOR n=3


*

*For n=3 and r= 1 you get F = k

*For n=3 and r= 2 you get F= k/4

*For n=3 and r = 1/2 you get F = 4k


*FOR n=4
-For n=4 and r= 1 you get F = k
-For n=4 and r = 2 you get F = k/8
-For n=4 and r = 1/2 you get F= 8k
*FOR n=10
-For n=10 and r=1 you get F = k
-For n=10 and r = 2 you get F= k/1024
-For n= 10 and r = 1/2 you get F = 1024k
So, as the dimensions get to be more, the force of gravity "dilutes" over all the dimensions as you increase distance, whereas at smaller distances you can get a relatively stronger effect. Gravity has been measured down to about a millimeter and this effect has not been observed. 
This tends to be similarly true, also for General Relativity, although it is not about forces then but curvature, and the numerical answers are not as simple. But the concept generally holds. Dimensions also make a difference in String Theory.
However, it turns out, see below, that those extra dimensions (besides our 3 known spatial dimensions) cannot be too small (String Theory in some versions claims those extra dimensions are very small, Planck sized)  -- in fact at least one or two have to be large dimensions if gravity is to be diluted by them. Meaning, they need to encompass non-microscopic sizes. How much? 
From http://www.eurekalert.org/features/doe/2001-10/dbnl-gil053102.php:   "How big would extra dimensions have to be? For gravity to equal the other forces at a hundred-thousandth of a trillionth of an inch (the electroweak scale), one extra dimension would have to be as big as the distance between the Earth and the sun. Two extra dimensions need extend only about a millimeter, however, and the more extra dimensions there are, the smaller they can be". 
Now, CAREFUL, for even in those higher dimensional theories -- WHICH BY THE WAY HAVE NOT BEEN PROVED IN ANY WAY, AND NO EXTRA DIMENSIONS HAVE BEEN FOUND -- whether it works the way I described or not depends on a) whether those extra dimensions, besides our known 3 dimensions, are small or large, and b) whether gravity is constrained to only propagate in 3D (called a 3D brane in String Theory), or propagate in all 10 dimensions. 
String and Superstring theory (really, M-theory, see https://en.wikipedia.org/wiki/M-theory, and https://en.wikipedia.org/wiki/String_theory#Extra_dimensions), require a minimum of 10 spatial dimensions. If those, or some of those are big dimensions, then the weakness of gravity might be explained, and then if we then look at smaller and smaller distances, gravity is (relatively) stronger. It is also one reason there are attempts to measure the strength of gravity at smaller and smaller distances -- to see if it does not go as $1/r^2$. So far, as I said above, it's only been down to about 1 millimeter, and nothing strange has been found.
String Theory mostly has it (because the strings that cause gravity were thought to be able to extend in all dimensions, whereas normal forces like nuclear and electromagnetism strings are constrained to move in our 3D brane) that gravity propagates in the 10 spatial dimensions. String Theory also assumed that the other dimensions are small, microscopic and we can't see them. Then you need to calculate how much it dilutes gravity.  But some String Theory developments assume 1 or more large extra dimensions, and then it dilutes (and gets relatively stronger in the much smaller domain). 
You really need a quantum gravity theory to determine any of it, and dimensions and their sizes makes a difference. String Theories remain possibilities, but have lost some luster because the majority of them depend on supersymmetry being true, but there has not been any superparticle found at the LHC, so far. Still, there remains both a theoretical and experimental interest in the higher dimensions.
