Well, there is a bit of confusion in this answer. First one should mention that this kind of reasoning boils down to the integral theorems of classical vector analysis or, in a more modern way in terms of alternating differential forms, to the general Stokes theorem.
Let's put it in the classical way of 3D Euclidean vector analysis since this is more intuitive and that's what's needed in E&M intro lectures. Gauß's Law connects the volume integral over the divergence of the vector field with the integral of this vector field over the surface integral along the boundary of the volume, i.e.,
\int_V \mathrm{d}^3 x \vec{\nabla} \cdot \vec{V} = \int_{\partial V} \mathrm{d}^2 \vec{F} \cdot \vec{V}.
Here, the surface-element normal vectors have to be oriented such that they always point out of the volume you integrate over. This is a mathematical theorem valid for any sufficiently well-behaved vector fields, volumes and boundaries.
One application of this mathematical theorem in E&M is to use Gauß's Law of electrodynamics, which is one of the fundamental laws of electromagnetism, i.e., one of Maxwell's equations:
\vec{\nabla} \cdot \vec{D}=\rho.
Here \vec{D} is the electric flux density and \rho the charge density. Using Gauß's theorem by integrating over a volume clearly gives the integral form of this law:
\int_{V} \mathrm{d}^3 x \rho=\int_{\partial V} \mathrm{d}^2 \vec{F} \cdot \vec{D}.
On the right-hand side you have, by definition of charge density, the charge enclosed in the volume, V, and on the right-hand side the electric flux through the boundary of this same volume. Of course, again you have to orient the suface-normal vectors out of this volume, i.e., the relative orientation of the boundary to the volume must be positive.