First note that
$$
(x-1) f(x) = x^p+x^{p-1} + x^{p-2} + \cdots + x - p .
$$
This implies that all the roots of $f$ lie strictly outside the unit circle. For if $f(\alpha) = 0$ with $|\alpha| \leq 1$, then rearranging the above and using the triangle inequality yields
$$
p = |\alpha + \cdots + \alpha^{p}|
\leq \sum_{i=1}^{p} |\alpha|^i \leq p .
$$
But this implies that $\alpha = 1$, which is not the case since $f(1) \neq 0$.
Now suppose that $f$ factors as $f = gh$. Then since $p = f(0) = g(0) h(0)$ is prime, one of $g$ or $h$ must have constant term equal to $\pm 1$.
But then $\pm 1$ is the product of the roots of this factor, which are all greater than 1 in absolute value.
But this is impossible, so we conclude that $f$ is irreducible.