Imagine two surfaces: $S_1 : f(x,y,z) = c_1$ and $S_2 : f(x,y,z) = c_2$ where $c_1 < c_2 $. Now let's see what happens in a region $ x \in (a,a+\Delta x),\ y \in (b,b+\Delta y) $$ x \in (a,a+\Delta x),y \in (b,b+\Delta y) $ in which $S_1$ is approximately flat. Let's take the perpendicular to $S_1$ lines that extend from the corner points of $S_1$ to $S_2$. In the region that these lines define, $S_2$ is going to have a point $P_{min}$ with minimal distance from $S_1$ and a point $P_{max}$ with maximal distance from $S_1$. Let's define as $D$ the difference between their respective distances from $S_1$. Now we can arbitrarily choose a $D' < D$ and a surface of the same form will exist between $S_1$ and $S_2$ with a point $P'_{max}$ with maximal distance $D'$ from $S_1$. This is allowed because $f(x,y,z)$ is continuous and the surfaces cannot intersect. Let $P'_{min}$ be the point with least minimal distance from $S_1$. Then the difference of their respective distances distances will be less than $D'$. If we choose a $D'$ small enough the resulting surface $S' : f(x,yz) = c'$$S' : f(x,y,z) = c'$ will be approximately flat and parallel parallel to $S_1$ in the specified region. Now the gradient $\nabla f$ points to the direction of the biggest increase of $f(x,y,z)$. Inside the region, the shortest path from any point on $S_1$ to $S'$ is through the perpendicular line. Since the same will happen for all surfaces between $S_1$ and $S'$, the gradient will be perpendicular to the surface.