A question on the Poisson field equations in classical gravity and EM I'm having a problem understanding why in the Poisson equation for gravitational potential, the term with the mass density has a positive sign, while for the electric potential, the charge density has a negative sign.
Gravitational potential: $$\nabla^2\phi=4\pi G\rho$$
Electric potential: $$\nabla^2\phi=-\frac{4\pi}{c}\rho$$
in both cases $-\nabla\phi=\vec{g}$ or $\vec{E}$, therefore it seems that the mass density appears with a minus sign for the gravitational case and the charge density, positive for the electromagnetic case.
I've seen a couple of derivations for the gravitational Poisson equation all using Newton's law for gravitation. Is there a more general way to derive the gravitational Poisson equation?
And is there a good explanation as to why the right hand sign is different in the gravitational case?
 A: I think it has to do with the inherent pull/push associated with each force. Consider, a gravitational force and potential. If you put a test mass somewhere in the potential, it will be drawn to a minima. On the flip side, consider an electric potential, where positive test charges are the standard. The test charge will be pushed away from another positive charge. So for gravity, $\nabla \cdot \vec{g} = - \rho$, where $\vec{g}$ is the gravitational field vector, $\rho$ is the mass density, and I have dropped the constants in the equation so we only focus on the signs.  The similar equation for $\vec{E}$ is ,  $\nabla \cdot \vec{E} =  \rho$, where $\vec{E}$ is the electrical field vector, $\rho$ is now the charge density, and once again I have dropped the constants from the equation to focus on the sign. Now we make the same substitution; we replace the vector field with the negative gradient of a potential. So, $\nabla^2\phi_g=\rho$ and $\nabla^2\phi_E=-\rho$.
A: $\require{cancel}$
I think the $\pm$ signs were explained well by @PaulPhy. It's to do with the fact that gravity is only attractive, while the electric field $\textbf{E}$ in classical EM can be either attractive or repulsive, which is solely determined by the charge distribution at hand. On your first question, if one starts by the axiom (which is in integral form):
$$\iint_{\partial V} \textbf{g} \cdot \text{d}\textbf{S} = -4 \pi G M \ \ \ \tag{A}$$
where $\partial V$ is any closed surface, $\textbf{g}$ is the gravitational field and $M$ is the total mass that $\partial V$ encloses. I note here that the minus sign is put to take into account that field lines are always attractive. Then, it is quite easy to see that the Poisson field equation
$$\nabla^2 \phi(\textbf{r}) = 4\pi G \rho(\textbf{r})$$
becomes a theorem under $(\text{A})$, since, for $\textbf{g}:=-\nabla \phi \,$, we have:
$$\iint_{\partial V} \bcancel{-} \nabla \phi \cdot \text{d}\textbf{S} = \bcancel{-}4 \pi G \iiint_{V} \rho \, \text{d}^3\textbf{r} \overset{\color{red}{(1)}}{\Longrightarrow} \iiint_{V} \nabla^2\phi \cdot \text{d}^3\textbf{r} = \iiint_{V} (4 \pi G \rho) \, \text{d}^3\textbf{r} \overset{\color{red}{(2)}}{\Longrightarrow} $$
$$\nabla^2 \phi(\textbf{r}) = 4 \pi G \rho(\textbf{r})$$
where in $\color{red}{(1)}$, the Divergence Theorem was used, and in $\color{red}{(2)}$, we equated the integrands for any $\textbf{r} \in \mathbb{R}^3$ as $V$ is any abstract volume in $\mathbb{R}^3$. This is as general as it gets.
A: Basically because the divergence of the electric field is positive inside a region with a given charge density. The components of the field increase when the coordinates increases.
It is similar for the Gravitational field, but with the opposite sign. $g$ also increases in modulus with the coordinates, but that increase means that the components become more negative. So the divergence is negative.
When we take the divergence for $\mathbf g$, the negative sign of the gradient cancels out, what doesn't happen in the case of $\mathbf E$.
