This is the from a proof of the fact that gradient is zero at the minima of a continuous function. This is taken from Numerical Optimization by Nocedal and Wright, page 11.
Could anyone explain how the last statement came about from the continuity of the gradient near x*? In particular, if grad f is continuous, how can we talk about the dot product of p with grad of f at x*+tp?

If $\nabla f$ is continuous at $x^*$ then $p\cdot\nabla f$ is too (since the dot product with a constant vector is continuous from $\mathbb{R}^3\rightarrow \mathbb{R}$). The latter is nonzero at $x^*$ so by continuity it is nonzero in a neighborhood of $x^*$, which gives your final inequality.