From the inverse square dependence of forces, we can have an analogy of electric and gravitational forces.
The charge is analogous to mass.
Gravitation states F∝−m1m2 and in Electrostatics, F∝q1q2
The proportionality constant is G in gravitation and 14πϵ0 in electrostatics.
Thus, G∼14πϵ0 and m∼q
Gauss' law for electrostatics is ∮→E.→ds=qenclϵ0=4πqencl4πϵ0
The analogous quantity for electric field is →g
Thus, the Gauss' law for gravitation is ∮→g.→ds=−4πGmencl
But, the mass enclosed in the surface is m
Thus, ∮→g.→dS=−4πGm