So, for everyone out there with a little bit science background, here is why it cant merely be density. Each molecule of water has an identical mass and takes up the exact same amount of space, therefore the same density. So, if there was no external force acting on the water in our example, you would expect all these molecules to stack up like Lego blocks, and there would be no difference in pressure between the top of the container and the bottom. Remember, all of these molecules share identical density. There is no preferential need for them to move or exert force on each other if it is only about density. Yet, as can easily be demonstrated by any cheap pressure gauge, something is squeezing the molecules at the bottom of the container far more than the molecules at the top....even though THEY ARE ALL THE SAME DENSITY.
Now this is wholly consistent if there is an external force acting on each molecule in the container, and if that force is pulling towards this big chunk of rock beneath our feet. The pressure differential is accounted for by the weight of the water above compressing the water below it. Since weight is measured in units of force, its equal to the mass of the water molecule times the acceleration provided the parent body, in this cases that big old giant rock beneath our feet. When you multiply that by how much water is above any particular point in our container, it perfectly matches what we would expect from the gravitational attraction of the earth.