I think you also forgot to normalize your vector $\,\vec p\,$ . Taking it from where you were, and assuming we already have $\,||\vec p||=1\,$ , we have by definition with $\,\bf x:=(a_1,a_2,...,a_n)\;$
$$D_{\vec p}f(\bf x):=\text{The directional derivative of $\,f\,$ at point $\,\bf x\,$ in the direction of $\,\vec p$}:=$$
$$:= \lim_{t\to 0}\frac{f(x+t\vec p)-f(x)}t\stackrel{\text{Chain Rule}}=\sum_{k=1}^n \vec p\cdot \frac{\partial f}{\partial x_k}(a_1,...,a_n)=\nabla f(\bf{x})\cdot\bf \vec p$$
So if the function is differentiable at any point (say, when the partial derivatives exist and are continuous at any point), its directional derivative in any direction exists and it's pretty easy to calculate by means of the gradient of $\,f\,$ .
Added: We want the directional derivative of $\;f\;,\;f:\Bbb R^n\to\Bbb R\;$ at the point $\,x:=(x_1,...,x_n)\,$ and in the direction $\,p:=(p_1,...,p_n)\,$ (no little arrows, no nothing) .
We also assume $\,||p||:=\sqrt{\sum_{k=1}^n p_i^2}=1\;$ (note then that you will have to normalize the vector in which direction you want the derivative in case it is not normalized!).
Now we define a new function
$$g:\Bbb R\to\Bbb R^n\;,\;\;g(t):=x+tp=\left(x_1+tp_1\,,\,x_2+tp_2\,,\ldots,x_n+tp_n\right):=(g_1(t),...,g_n(t))$$
Note that $\;\forall\,t\;,\;\,g'(t)=p\implies g'(0)=p\,$ , and we also denote the derivative of some function $\,k\,$ by $\,Dk\,$ and by $\,D_uk\,$ the directional derivative of $\,k\,$ in the direction of $\,u\,$, for simplicity.
Thus, by definition we get that
$$D_pf(x):=\lim_{t\to 0}\frac{f(x+tp)-f(x)}t=\left.\frac d{dt}(f(x+tp))\right|_{t=0}=\left.D(f\circ g)(t)\right|_{t=0}\stackrel{\text{chain rule}}=$$
$$=Df(g(0))\cdot Dg(0)=\left(f'_{x_1}(g(0))\,,\,f'_{x_2}(g(0))\,,\ldots,f'_{x_n}(g(0))\right)\cdot(g'_1(0)\,,\,\ldots,g'_n(0))=$$
$$\left(f'_{x_1}(g(0))\,,\,f'_{x_2}(g(0))\,,\ldots,f'_{x_n}(g(0))\right)\cdot(p_1,...,p_n)=\nabla f(x)\cdot p$$
which is what we wrote above...:)
IMPORTANT: You can use the gradient as above to calculate the directional derivative only if you're sure the partial derivatives exist in some neighborhood of $\,x\,$ and are continuous there.
Best Answer
So you consider a function $f:\mathbb{R}^n\to\mathbb{R}$ and a function $g:\mathbb{R}\to \mathbb{R}$. For the sake of simplicity, assume that they are differentiable everywhere.
Let $\mathbf{x}=(x_1,\dots,x_n)\in\mathbb{R}^n$ and $1\le i\le n$ fixed. What is $\frac{\partial f}{\partial x_i}(x_1,\dots,x_n)$ ? By definition, $$\frac{\partial f}{\partial x_i}(\mathbf{x})=\lim_{x_\to x_i} \frac{f(x_1,\dots,x,\dots,x_n)-f(\mathbf{x})}{x-x_i}.$$ In other words, if you consider the fonction $f_i: \mathbb{R}\to\mathbb{R}$ such that $f_i(x)=f(x_1,\dots,x,\dots,x_n)$, then simply $$\frac{\partial f}{\partial x_i}(\mathbf{x})=f_i'(x_i),$$ the usual derivative.
Now, back to your problem, you are interested in the function $h=g\circ f:\mathbb{R}^n\to\mathbb{R}$ and $\frac{\partial h}{\partial x_i}$. We consider in the same notations as above the function $h_i: \mathbb{R}\to\mathbb{R}$. You can easily see that in fact $h_i=g\circ f_i$. Therefore, by the chain rule for functions from $\mathbb{R}$ to $\mathbb{R}$ (note that $g$ and $f_i$ are two such functions), you get that $$\frac{\partial h}{\partial x_i}(\mathbf{x})=(g\circ f_i)'(x_i)=g'(f_i(x_i))f_i'(x)=g'(f(x))\frac{\partial f}{\partial x_i}(\mathbf{x}).$$