Before answering your question, not every Hamming code is equivalent to some cyclic code. For instance, the ternary $[4,2,3]_3$ Hamming code (aka the tetracode) is not equivalent to any cyclic code.
But it is true that binary Hamming codes can all be seen as cyclic codes. In fact, the $[2^r-1,2^r-r,3]$ Hamming code is the primitive narrow-sense BCH code of length $n = 2^r-1$. More generally, the $q$-ary $[\frac{q^r-1}{q-1},\frac{q^r-1}{q-1}-r,3]_q$ Hamming code with $\gcd(r,q-1)=1$ is the narrow-sense BCH code with its defining set being the $q$-cyclotomic coset $C_1$ of $1$ modulo $n$.
So, if you would like a generator polynomial of the $[15,11,3]$ Hamming code, take the $2$-cyclotomic coset $C_1=\{1,2,4,8\}$ of $1$ modulo $15$. The generator polynomial $p(x)$ you want is the corresponding minimal polynomial
$$\prod_{i\in C_1}(x-\alpha^i),$$
where $\alpha$ is a primitive $15$th root of unity in $\mathbb{F}_{2^4}$.
For instance, take the irreducible polynomial $x^4+x+1$ over $\mathbb{F}_2$. If you regard $\mathbb{F}_{16}$ as $\mathbb{F}_2[x]/(x^4+x+1)$, the element $x$ is a primitive $15$th root of unity. Writing this element as $\alpha$, your $p(x)$ is
$$\begin{align*}p(x) &= \prod_{i\in \{1,2,4,8\}}(x-\alpha^i)\\
&= (x-\alpha)(x-\alpha^2)(x-\alpha^4)(x-\alpha^8)\\
&= x^4+x+1.\end{align*}$$
If you would like the proof that the $[\frac{q^r-1}{q-1},\frac{q^r-1}{q-1}-r,3]_q$ Hamming code with $\gcd(r,q-1)=1$ is the narrow-sense BCH code with defining set $C_1$, assume that $\gcd(r,q-1)=1$. Let $\alpha$ be a primitive element of $\mathbb{F}_{q^r}$, where $\alpha^{q-1}$ is a primitive $n$th root of unity. Construct a cyclic code (actually the narrow-sense BCH code) of length $n=\frac{q^r-1}{q-1}$ by taking the minimal polynomial $M_{\alpha^{q-1}}(x)$ of $\alpha^{q-1}$ as its generator polynomial. The nonzero elements of the subfield $\mathbb{F}_q$ in $\mathbb{F}_{q^r}$ are powers of $\alpha$, where the power is a divisor of $n$. Since $\gcd(r,q-1)=1$, the only element that can be a power of $\alpha^{q-1}$ is the identity. Hence, writing the elements of $\mathbb{F}_{q^r}$ as $r$-tuples in $\mathbb{F}_{q}^r$, no $r$-tuples corresponding to $\alpha^0, \alpha^{q-1}, \dots, \alpha^{(q-1)(n-1)}$ are multiples of another using only elements of $\mathbb{F}_q$, which means that these are simply the points on projective geometry $\operatorname{PG}(r-1,q)$. Hence, the $r \times n$ matrix $H$ in which the columns are the $r$-tuples corresponding to $\alpha^0, \alpha^{q-1}, \dots, \alpha^{(q-1)(n-1)}$ is the parity-check matrix of the $[\frac{q^r-1}{q-1},\frac{q^r-1}{q-1}-r,3]_q$ Hamming code.