In the position basis, it still looks like -i \hbar \vec \nabla. In the momentum basis, it's simply p. To obtain it in some other basis, you change basis in the standard way.
The best way to find the result of acting with \hat p is to insert identity operators like so:
\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}
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 \langle p | x \rangle = e^{-ipx}.
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.