Yes. If there is $y\in\mathbf R^n$ such that $p(y)=0$ and $\mathop{grad} p(y)\neq0$ then the set $\{p=0\}$ is a smooth real hypersurface of $\mathbf R^n$ in a neighborhood of the point $y$. This implies that $\{p=0\}$ is Zariski dense in the set $\{z\in\mathbf C^n\mid p(z)=0\}$. Hence, if $q$ vanishes on the real zero set $\{p=0\}$, it also vanishes on the complex zero set of $p$. It also implies that $p$ is irreducible in $\mathbf C[x_1,\ldots,x_n]$. Therefore, $p$ divides $q$ in $\mathbf C[x_1,\ldots,x_n]$ and hence in $\mathbf R[x_1,\ldots,x_n]$.
Note that the conditions on the degree of $p$ and $q$ are superfluous.