In the position basis, it still looks like [itex]-i \hbar \vec \nabla[/itex]. In the momentum basis, it's simply [itex]p[/itex]. To obtain it in some other basis, you change basis in the standard way.
The best way to find the result of acting with [itex]\hat p[/itex] is to insert identity operators like so:
[tex]\begin{align}<br />
\hat{p} | \psi \rangle &= \int dp \; \hat{p} | p \rangle \langle p | \psi \rangle = \int dp \; p | p \rangle \langle p | \psi \rangle \\<br />
&= \int dp \; p | p \rangle \int dx \; \langle p | x \rangle \langle x | \psi \rangle \\<br />
&= \int dp \; | p \rangle \int dx \; p e^{-ipx} \psi(x) \\<br />
&= \int dp \; | p \rangle \int dx \; i \frac{d}{dx} \big( e^{-ipx} \big) \psi(x) \\<br />
&= \int dp \; | p \rangle \int dx \; e^{-ipx} \bigg( -i \frac{d}{dx} \psi(x) \bigg) \\<br />
&= \int dx \; \int dp \; | p \rangle \langle p | x \rangle \bigg( -i \frac{d}{dx} \psi(x) \bigg) \\<br />
&= \int dx \; | x \rangle \bigg( -i \frac{d}{dx} \psi(x) \bigg)<br />
\end{align}[/tex]
Here I've done these steps:
1. Insert the resolution of the identity in the p basis.
2. Since we're in the p basis, the p operator can be replaced by its eigenvalue on each basis ket.
3. Insert the resolution of the identity in the x basis (since our goal is to get the p operator in the x basis).
4. Use the fact that [itex]\langle p | x \rangle = e^{-ipx}[/itex].
5. Do standard calculus tricks, integrate by parts.
6. Observe that we have an identity in the p basis we can remove.
7. Finally, we see the action of the p operator in the x basis.