Snell's law is obtained by applying the electromagnetic boundary conditions to the problem; therefore it holds under all circumstances where Maxwell's equations hold.
In order to see what happens for angles of incidence greater than the critical angle, we derive Snell's law. The electromagnetic boundary conditions take the following form for both TE and TM polarizations of the incident wave:
$$A_ie^{j\mathbf{k_+ \cdot r}} + A_re^{j\mathbf{k_- \cdot r}} = A_te^{j\mathbf{k'\cdot r}}$$
Snell's law is derived by taking care of the exponential parts for $z=0$:
$$k_x=k_x' \rightarrow k\sin \theta = k'\sin \theta' \rightarrow \boxed{n\sin \theta =n'\sin \theta'}$$
Now we obtain the wavevectors in the $z$ direction, $k_z$ and $k_z'$:
$$k_z^2+k_x^2=k^2=n^2 k_0^2$$
$$k_z'^2+k_x'^2=k'^2=n'^2 k_0^2$$
Using the Snell's law ($k_x' = k_x$, so $k_x' = k \sin \theta = n k_0 \sin \theta $) we find, from the second equation:
$$k_z'^2 = k_0^2 \left( n'^2 - n^2 \sin^2 \theta \right) \Rightarrow k_z' = k_0\sqrt{n'^2-n^2\sin^2 \theta}$$
Using this equation we can see what happens for angles of incidence greater than the critical angle. If $n'<n\sin \theta$ the wavevector in the $z$ direction would become imaginary. $k_z' = j \alpha$, with
$$\alpha = k_0 \sqrt{n^2\sin^2 \theta - n'^2}$$
and the wave function in the right-hand medium would be
$$()e^{- \alpha z + j k_x' x}$$
Therefore, there exists a wave in the second medium even for $\theta >\theta_0$, but it decays exponentially with $z$ and doesn't carry any energy in the $z$ direction (an evanescent wave).