eyeballfrog linked you to the more formal answer, but I'll try to give you some intuition. Momentum space is simply the Fourier transform of position space. Suppose you have some function $f$ which is represented by $f(x)$ in position space and $\hat{f}(p)$ in momentum space. It is a well known result in Fourier analysis that $$\mathscr{F}[f'(x)] = ip \hat{f}(p),$$
and so, in a sense, taking a derivative in Fourier/momentum space is mapped to a multiple of $ip$. Informally, the Fourier transform of the derivative operator can be thought of as the following transformation: $$\frac{\partial}{\partial x} \rightarrow ip.$$
So, given that $\hat{p}$ is given by $-i\partial_x$ in position space we take the Fourier transform to obtain the momentum representation: $$\mathscr{F}\left[-i \frac{\partial}{\partial x} \right] = -i(ip) = p.$$
(As expected, $\hat{p} = p$ in momentum space). Finding the position operator in momentum space, which we denote as $\mathscr{F}[x]$, will be a little trickier. The trick here is resolved by noting that the double Fourier transform simply reflects the original function: $$\mathscr{F}[\mathscr{F}[f(x)]] = f(-x).$$
(Proved here.) In our case, $f(x) = x$, so $$\mathscr{F}[\mathscr{F}[x]] = -x,$$ where $\mathscr{F}[x]$ is exactly what we're trying to solve for. We already know that the derivative operator maps to $ix$, so $\mathscr{F}[x]$ must be proportional to the derivative operator. Indeed, if $\mathscr{F}\left[ \frac{-1}{i} \frac{\partial}{\partial p} \right]$ then this puzzle is solved $$\mathscr{F}\left[ \frac{1}{i} \frac{\partial}{\partial p} \right] = \frac{-1}{i} \mathscr{F}\left[ \frac{\partial}{\partial p} \right] = \frac{-1}{i} (ix) = -x, \,\,\, \checkmark$$ and so $\mathscr{F}[x] = (-1/i) \partial_p$. The complete result follows once you realize that $(-1/i) = i$. We have thus shown that $$\mathscr{F}[x] = i \frac{\partial }{\partial p},$$ as desired.