"The greater the compression, the greater the density" is essentially tautological. Of course packing the same amount of stuff in a smaller space makes it more dense. It's true in the same way the statement "Enlarging things makes them bigger" is true.
But as for gravity, no. Gravity is a function of mass. Compressing a body into a smaller space will not increase the gravity you experience at a given distance from the mass's center of gravity (though it will allow you to get closer to the center of gravity). If you magically replaced the Sun with a black hole of equal mass, the planets would continue their orbits undisturbed — even though a black hole's singularity is infinitely dense and the Sun is less dense than the Earth on average.
But as for gravity, no. Gravity is a function of mass. Compressing a body into a smaller space will not increase the gravity you experience at a given distance from the mass's center of gravity (though it will allow you to get closer to the center of gravity). If you magically replaced the Sun with a black hole of equal mass, the planets would continue their orbits undisturbed — even though a black hole's singularity is infinitely dense and the Sun is less dense than the Earth on average.