Gauss' law for gravitation
For any surface $S$ (Gaussian surface), the gravitational field $\v g$ and the mass enclosed is related by $$ \begin{align*} \int_S \v g(\v r)\cdot d\v A = -4\pi G \sum_i M_i \end{align*} $$
Use this to compute the gravitational field due to a long rod ($g(r) = 2G\rho/r$) and a large plane ($g = 2\pi G\rho$).