Why doesn't Earth collapse into a black hole?

No.12638639 ViewReplyOriginalReport
Earth has layers, with each deeper layer being denser than the previous. Gravitational pull should pull the mantle into the core making it denser and denser. Since earth is still here, this implies one of two possibilities. Either a mechanism counters gravity making this not happen, or our model of the inner earth is incorrect. Assuming our model is correct, what's going on?