Aren't Gauss's law for magnetism and Faraday's law of induction contradictory? Gauss's law states that $\int_S \vec B\cdot d\vec S=0$. But law of induction states that $\xi=-\frac {d\phi}{dt}$, where $\phi=\int_S \vec B\cdot d\vec S$.
So if Gauss's law was to be correct there should be no induction at all, because then $\phi$ would be zero through every loop.
 A: Gauss's law states that $\int_S \vec B\cdot d\vec S=0$ for a closed surface, while the induction law relates the flux through an open surface to the electromotive force ($\xi$) in the circuit formed by its border
A: The definition of magnetic flux is
$$\Phi = \int_S d\vec{A}\cdot\vec{B},$$
where the integral is not over a closed surface in general. Gauss' Law requires that the integral is over a closed surface, and so there is no contradiction.
In particular, look at any basic discussion of Faraday's Law. They always look at simple loops or coils of wire. There are clearly not closed surfaces, and so the definition of flux can't involve a closed surface in these cases. Without a closed surface it's easy to think of cases where the field gives nonzero flux.
A: One needs to think of the integral theorems $$\begin{align} \int_V (\nabla \cdot \mathbf F) \, dV & = \int_{\partial V} \mathbf F \cdot d \mathbf S
\tag 1 \\
\int_S (\nabla \times \mathbf F) \cdot d \mathbf S & = \int_{\partial S}  \mathbf F \cdot d\mathbf r \tag 2
\end{align}$$
in the right way, as relating an integral of a derivative  to an integral over the boundary. They are vast generalizations of the fundamental theorem of calculus, $$\int_a^b f'(x) \, dx = f(b) - f(a).$$
The terminology "open" and "closed" is awful and confusing. One should think in terms of boundaries.
The 2-dimensional surface you apply Gauss's law (1) to must be the boundary of some 3-dimensional volume. Gauss's law only says that the net magnetic flux through any boundary is zero. Let us retrace your argument. From Faraday's law of induction, $\partial_t \mathbf B = -\nabla\times\mathbf E$ we get that $$\int_{\partial S} \mathbf E \cdot d \mathbf r = \int_S (\mathbf \nabla \times \mathbf E) \cdot d \mathbf S = - \partial_t \int_S \mathbf B\cdot d\mathbf S.$$
Now, if $S = \partial V$, that is, $S$ is a boundary, then we would have $$-\partial_t \int_S \mathbf B \cdot d\mathbf S = -\partial_t \int_V (\underbrace{\nabla \cdot \mathbf B}_{=0}) \, dV = 0.$$
However, if $S = \partial V$, then the original integral was over $\partial (\partial V)$, that is, the boundary of a boundary. But it is a standard theorem that the boundary of a boundary is the empty set. Therefore, there is no contradiction, as the original integral must have been over the empty set, and thus trivially zero.
A: I do not think that I need to draw a closed surface but here is an example of an open surface with a closed loop at its throat.
This is likened to a butterfly net.  

It is often the case that the closed surface is taken to be in the plane of the loop for ease of calculation but this does not always have to be so.
The answer to a recent question illustrates this.
