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.