It is not true that an infinite amount of matter would result in an infinite amount of gravity. I'll give an example: Consider a particle with mass M at some point in an (Euklidian) space and an infinite sequence of particles with mass m, arranged in a straight line, with distance r between two neighbours and the first particle, looking like this:
M <-r-> m <-r-> m <-r-> m <-r-> m <-r-> m ...
Now compute the effect of gravity on M. The k'th mass m particle attracts M with a force G M m / (k r)^2. Sum this over k from 1 to infinity, the result is Pi G M m / 6r^2, which is obviously finite.
Let's apply this result to the universe, but in a more relativistic way. As I stated somewhere in this thread, cosmological modelling is mainly solving the Einstein equations. A very simple model assumes that space is homogeneous and isotropic, i.e. there are no differences between different locations or different directions. Of course this is not true on small scales, since it is a huge difference if you are in free space or inside some star, but we assume it is true for very large scales, so each point of the universe has the same energy density (which is in fact the same as matter - there is no difference) and pressure (which is computed in the sense of thermodynamics - but that would lead much to far to explain here).
It is possible to solve the Einstein equations for this model. The first result is that the universe is not static. Its geometry is time dependant and one finds that there has to be a finite age of the universe. There has to be a global time origin which is known as the Big Bang. The second result is that there are three possible solutions, depending on the energy density, as I stated in this thread.
So what has been calculated based on observations? First of all, there is Hubble's constant, which is the ratio of distance and speed of far galaxies. It corresponds to the inverse age of the universe. Using the model above, it is possible to calculate the ratio of energy density and critical energy density, which is close to 1. The second thing is the density of visible matter, also knows as stars. It is about 5 percent of the total energy density. By observing rotating galaxies one finds that there has to be much more matter inside these galaxies than visible matter, because the gravity of the visible matter is too small to keep the galaxy together at high rotation speeds. Another observation is that galaxies are like lenses, by curving spacetime through their gravity. These effects are evidence for the existence of the so called dark matter, which is about 30 percent of the total energy density. The missing energy is called dark energy.
If you are interested in cosmology, I recommend some books. Of course it depends on your scientific background - since I don't know about that, choose what you like.
One of the best books for beginners is "A brief history of time", written by Stephen Hawking. He's my favourite author and cosmologist.
A nice introduction on the web can be found at
http://www.superstringtheory.com/cosmo/cosmo2.html It explains in more detail what I summarized above.
If you like to go deeper into cosmology (and maybe solve the Einstein equations?), I recommend reading a good book about general relativity. Unfortunately the best books I know are in german... Einstein's original article is also quite interesting.
A simple solution to the Einstein equations is shown at
http://www.superstringtheory.com/cosmo/cosmo2a.html This is the mathematical way.
There are also lots of tutorials on the web, but general relativity requires a lot of mathematical knowledge. Don't try to understand it unless you know about manifolds, tensors and tangent spaces!
One final thing: In general relativity, spacetime is thought of as a manifold, which is well-defined. Space is finite if and only if a certain integral over this manifold is finite, which can be computed for the models above. So there is an exact definition of finite or infinite space.