Which physical quantity is represented by the surface integral of magnetic field? The answer is given as magnetic flux in one place and Gauss law of magnetism in another. So which one is correct and why? 
 A: Magnetic flux is the surface integral of the magnetic field. 
Guass's law of magnetism describes a (so-far universal) observation about magnetic flux: The total magnetic flux through any closed surface is zero. 
A: Magnetic field always circulate (in steady current situations) like this 
 
So, if you take any closed volume  containing the magnetic field you will find that field lines enter from one side and leaves from the other side, therefore, for any closed volume 
$$ \oint_A \mathbf{B} \cdot d\mathbf{A} = 0$$ By divergence theorem $$ \oint_V (\nabla \cdot \mathbf{B}) dV = \oint_A \mathbf{B} \cdot d\mathbf{A} $$ Therefore, we can write 
$$ \oint_V  (\nabla \cdot \mathbf{B}) dV = 0$$ and since, this is true for any volume, therefore $$ \nabla \cdot \mathbf{B} =0~~~~~~~(1)$$
The equation (1) is called the Gauss’ Law of Magnetism . However, if we take any closed surface (please understand that closed surface is different from closed volume, a Circle is a closed surface but a sphere is a closed volume) so taking surface integral around any closed surface, i.e. $$ \int_S \mathbf{B} \cdot d\mathbf{S}$$ is not necessarily zero and is called the magnetic flux.  
Hope it helps
