A question about gradient. The gradient of a function of two variable $f(x,y)$ is given by 
$$\left( \frac{\partial f}{\partial x} ,\frac{\partial f}{\partial y}\right). $$
It is also evident that gradient points in the direction of the greatest increase or decrease of a function at a point. My question is that whether the gradient vector is tangent to the function $f(x,y)$ at a point or not. The tangent here means that if you cut the graph of the function f(x,y) along the direction of the gradient vector then you will have a 2D curve formed where the function is cut. So is the gradient vector tangent to that curve at the particular point.

The answer is that your question doesn't actually make sense: the graph of $f(x,y)$ lives in $\mathbb{R}^2 \times \mathbb{R}$, whereas $\nabla f$ is in $\mathbb{R}^2$.
What is true is that $\nabla f(a,b)$ is normal to the level curve of $f$ passing through $(a,b)$: this is because, taking a local parametrisation of a level curve, $(x(t),y(t))$, we have
$$ f(x(t),y(t)) = c \\
(x(0),y(0))=(a,b),$$
the tangent to this curve at $(a,b)$ is $ (x'(0),y'(0)), $ and differentiating the $f(x(t),y(t))=c$ equation gives
$$ 0 = \left. \frac{d}{dt} f(x(t),y(t)) \right|_{(a,b)} = x'(0) \frac{\partial f}{\partial x}(a,b) + y'(0) \frac{\partial f}{\partial y}(a,b)  = (x'(0),y'(0)) \cdot \nabla f(a,b), $$
so $$ \nabla f \perp (x'(0),y'(0)). $$
On the other hand, we can consider the surface in $\mathbb{R}^3$ defined by $g(x,y,z) = f(x,y)-z=0$, which is essentially the graph of $f$ in three dimensions. Then
$$ \nabla g = (\nabla f, -1), $$
where I've abused notation slightly. By exactly the same idea as before, I can show that $\nabla g$ is normal to the surface $g$ (and hence the graph of $f$): take a parametrisation $(x(t),y(t),z(t))$ of a curve in the surface through $(a,b,c)$, and then differentiate $g(x(t),y(t),z(t))=0$.
