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.