May i know in what situation is the directional derivative in the direction of unit vector u the same as the ∇(f(x))?

i was reading the proof for finding the tangent plane for a surface and i realised that the formula when from using directional derivative to grad where

z = z' + (x-x') f' (x) (in the direction of u1) +(y-y') f' (x) (in the direction of u1)

= z' + (x-x') grad f wrt x +(y-y') grad f wrt y

i thought the direction derivative is tangent to a surface concerns and hence perpendicular to grad at a point on the surface?

thanks so much