Why did the matter in the early universe not stick together due to gravity? (Feel free to correct any mistaken assumptions I have)
The overall question I have is: given that the early universe started as an incredibly dense ball of matter and energy, why didn't that mass stick together in one huge "blob" due to gravity instead of becoming, as it is, "homogeneous and isotropic"?
One explanation I can think of is that the universe is constantly expanding. But if the expansion rate in the early universe was sufficient to tear apart this hugely dense ball of matter which must have been undergoing massive gravity, and the expansion rate is constantly increasing, why doesn't that same expansion force continue to tear apart stars and planets today?
Another possible factor is that heat in the early universe must have also been large, and heat tends to push atoms apart (not sure if this is true of subatomic particles). If this is the fundamental reason, we would expect to see an equilibrium reached between the expansionary force of heat, and the contractionary force of gravity, and (I reason), the universe would be composed of one big "galaxy" instead of, as it is, many galaxies quite separated from each other.
So what is the explanation for the current structure of the universe? Thanks.
 A: Atoms themselves didn't form until well after the Big Bang. The Big Bang Nucleosynthesis (BBN) is when most nuclei formed and that happened somewhere between 10 seconds and 20 minutes after the Big Bang (that's a long time relative to how quickly everything was happening back then). That would be when ions formed, neutral atoms didn't make an appearance until a few hundred thousand years later. Matter and other things with mass didn't form until after inflation ended. By that time, the universe had expanded so much that only the smallest regions of it were able to see and interact with each other. Because it expanded so rapidly, the range over which gravity could act was extremely small. When BBN started, at around 10 seconds, gravity could only influence things that were about as far away as 10 times the distance to the Moon. If Earth was around back then, it wouldn't even know of the Sun's existence, much less feel a gravitational pull towards it. By the time BBN ended, gravity's range would be enough to allow all the planets out to Mars to orbit the Sun. At this point, the universe was still expanding very fast as well.
So the reason why matter was able to avoid being all in one enormous clump is that it simply didn't feel the gravitational pull of other matter until it was too late to form a clump.
To be fair, even if all matter felt the pull of all other matter right from the beginning, the matter in the universe was distributed fairly homogeneously. This means there wouldn't be a net pull in any direction. There were inhomogeneities; perturbations in the density of matter. These would naturally tend to fall together with the smaller scale over-densities clumping first.
In reality, because of how fast the universe was expanding and how long it took for gravity to extend its influence over neighbouring regions, what we see is a combination of what I described above. The limited range of gravity and the rapid expansion prevented matter from any extensive falling together in very early times. As expansion slowed and gravity's reach extended outwards, we observe that matter formed structures; first on the smallest scales and later on larger scales. These structures were seeded by the over-densities.
A: First, the early universe was incredibly hot. Second, Gravity is the weakest force. Third, when we talk about the early universe, we analyse things up to the point that gravity is not important. Why? Because we don't have a quantum theory of gravity. Forth, you need to think of the early universe as an infinite dense soup of particles. It is homogenous and it would not clump in one point to form one galaxy. The reason galaxies form is because there were fluctuations in this homogeneity.
On a side note, I would personally worry that the electric force between the charges is much stronger than gravity, hence they would annihilate and we would only have radiation today! 
A: The error is to imagine that the incredibly dense ball of matter was located in a larger universe.  At that era, the incredibly dense ball filled the whole universe.  It was, to a good approximation, already homogeneous and isotropic.  If you believe in inflation, it made things even more so, but it wasn't a small blob in a large universe.
