Both formulas are equivalent, if you are in the electrostatic approximation and your dipole vector does not depend on the position $\mathbf{r}$.
Let's consider the expression $\mathbf{F}=\nabla_{\mathbf{r}}(\mathbf{p} \cdot \mathbf{E})$ which can be easily obtained from the potential energy function
$U=-\mathbf{p} \cdot \mathbf{E}$
and its relation with the force $\mathbf{F}=\nabla_\mathbf{r} U$. Now, recall the vector identity
$\nabla_\mathbf{r}(\mathbf{a}\cdot \mathbf{b})= (\mathbf{a} \cdot \nabla_\mathbf{r}) \mathbf{b}+(\mathbf{b} \cdot \nabla_\mathbf{r}) \mathbf{a} + \mathbf{a} \times (\nabla_\mathbf{r} \times \mathbf{b})+ \mathbf{b} \times (\nabla_\mathbf{r} \times \mathbf{a})$
for $\mathbf{a}=\mathbf{a}(\mathbf{r})$ and $\mathbf{b}=\mathbf{b}(\mathbf{r})$ two arbitrary vectors. For $\mathbf{p}=\mathbf{a} \neq \mathbf{p}(\mathbf{r})$ [independent of the position] and $\mathbf{b}=\mathbf{E}(\mathbf{r}$) we have
$\nabla_\mathbf{r}(\mathbf{p}\cdot \mathbf{E})= (\mathbf{p} \cdot \nabla_\mathbf{r}) \mathbf{E}+(\mathbf{E} \cdot \nabla_\mathbf{r}) \mathbf{p} + \mathbf{p} \times (\nabla_\mathbf{r} \times \mathbf{E})+ \mathbf{E} \times (\nabla_\mathbf{r} \times \mathbf{p})$
As the dipole vector does not depend on the position we can drop the second and the fourth terms. In the electrostatic approximation, Faraday's law reads $\partial_t \mathbf{B}=\mathbf{0}\Leftrightarrow \nabla_\mathbf{r} \times \mathbf{E}(\mathbf{r})=\mathbf{0} $ [this is known as ''Carn's law''] so that the electric field is irrotational and the curl vanishes. Then we can drop the third term and
$\nabla_\mathbf{r}(\mathbf{p}\cdot \mathbf{E})= (\mathbf{p} \cdot \nabla_\mathbf{r}) \mathbf{E}$
so that your definitions agree.