Otherwise I suppose it would be called the theory of gravity.
Cosmo, are you actually reading what is posted in this and other threads?
There are two theories of gravity we use. One is a little bit wrong the other may very well be. Newton's is the first, wrong but accurate enough for many uses. Einstein's is the second which corrects Newton's in the extreme cases. Because of some outstanding issues the best therory of gravity we have is not as solid as the theory of evolution.
Things still fall down, we many just not have some very, very fine details of
why they fall down right. (Mind you it may be the the general theory of relativity is fundamentally wrong not just in the details.)
The gravitational attraction between objects depends on their
mass not (directly their density). This was pointed out to you just a bit ago. Since it also varies with the distance there are some circumstances where it can appear to vary with density but that is not correct.
Some of this stuff is both new to you and not really easy. For that reason you are going to have to read, re-read and move along at a careful pace.
The reason we know that the gravitation attraction is based on mass is because it has been measured to be and measured very, very, very carefully. I'm not as sure but I think it is also a theoretical result of general relativity (our best theory of how gravity works). I can't do the math at that level though. The agreement between theory and measurements in this case is very good.