This is thought experiment. I couldn't get a good answer because I keep getting negative mass.
Gauss's Law say that eletric field is proportional to charge, how much charged is enclosed. Newton's gravitational pretty much says the same thing. More mass, strong gravitational strength.
So to put it mathematically
$$\vec{E} \propto \sum Q_{en}$$
But charge can be negative, a negative sum of charge means the electric field is going inwards.
$$\vec{g} \propto \sum M_{en}$$
But mass can only be positive, but g is then propotional to the mass enclosed, which means it will go radially outwards. That doesn't make sense because we know gravity is radially inward for a spherical shape (like earth)