Big bang black hole
Consider our universe at the moment of the Big Bang, or perhaps a very brief moment after the initiation of the Big Bang. Wouldn't the mass density of the universe at the moment of the Big Bang have been sufficient to form/maintain a black hole rather than an explosive expansion?
A very interesting question! You are correct that the density of matter was extremely great just after the Big Bang, but that does not imply the formation of a black hole that would prevent the expansion of the universe. The same theory (Einstein's theory of gravity, a.k.a. General Relativity) that predicts the existence of black holes predicts the expansion of the universe after the Big Bang.
When one talks about a black hole, one normally means a massive object surrounded by space that is relatively empty. The massive object is a center of attraction. If its density is sufficiently great, the gravitational attraction near it is so large that nothing, including light, can escape. An "event horizon" forms that encloses a region near the black hole. Nothing within the event horizon can escape --- neither objects nor information.
On the other hand, suppose ALL of space was filled with matter of great density, but the density was the same everywhere. Then every point in space would have the same density as every other point --- there would be no "center of attraction". Matter would not get pulled in one direction rather than another. So there would be no point around which an "event horizon" would form. What would happen in this case is that all of space would either be expanding or contracting in such a way that the density of matter always remained uniform, i.e. equal in all places. Note that space itself would be expanding or contracting. If expanding, then the effect of the matter (if ordinary matter and not so-called "dark energy") would be to cause the expansion to decelerate. One can think of this as due to all the matter "attracting" all the other matter and counteracting the expansion. If contracting, the effect of the matter would be to make the contraction speed up.
After the Big Bang, space was expanding rapidly. The mutual gravitation of the matter had the effect of slowing it down, but not preventing it.
But you are on to something. There is a kind of analogy between the Big Bang and black holes. If the density of matter in the universe is greater than the so-called "critical density", then eventually the expansion will end and contraction will commence and continue until all the matter gets squeezed together in a "Big Crunch", which would probably be the end of the universe and of time itself. Just as something falling into a black hole is doomed to fall all the way to its center, where it gets squeezed to very high density --- infinite density, in fact, if quantum mechanics is ignored, so too if the universe contracts all the matter is doomed to "fall" into the Big Crunch and be similarly crushed. (I have ignored "dark energy" in the above discussion. Dark energy can give other scenarios than the ones I mentioned.)
Also, there is a kind of "horizon" after the Big Bang. (It is called a "particle horizon" rather than an "event horizon".) This is the distance beyond which we cannot have any information about what is going on, because information (which cannot travel faster than light) has not had enough time to reach us since the Big Bang. The fact we cannot see beyond our horizon is somewhat analogous to the fact that someone outside a black hole cannot see what is happening within its "event horizon."
In fact, these analogies extend even to some of the formulas. The formula relating the "critical density" of the matter in the universe to the maximum size the universe gets before contracting is very similar to the relation between the density of matter when a black hole starts to form and the size of the black hole (i.e. the distance from its center to its event horizon).