I cannot totally agree with @dmckee.

First it is totally wrong to write something as:
$$\hat{P} = -i\hbar\partial /\partial x.$$
The correct way is to write:
$$\langle x|\hat{P}|\phi\rangle = -i\hbar\frac{\partial}{\partial x}\langle x|\phi\rangle,$$
and should be interpreted as the momentum operator in spatial representation.

Now let me derive it for you. 

The physical meaning behind momentum is that: 1. It is the conserved quantity corresponding to spatial translation symmetry. 2. Because of 1, momentum operator (hermitian) is the generator of spatial translation operator (unitary).

In terms of equations:

Define spatial translation operator $D(a)$ s.t. 
$$C|x+a \rangle = D(a)|x \rangle,$$
and:
$$D(a) = e^{-ia\hat{p}/\hbar}$$.

I assume you have no problem deriving this.

**Please note that this only depends on quantization condition** $[x,p] = i\hbar$**, **which is one of the postulates of quantum mechanics.**

Apply $D(a)$ on arbitrary state $|\phi\rangle$ and apply $D(a)$ on it:
$$D(a)|\phi\rangle = \int D(a)|\phi\rangle |x\rangle \langle x|dx$$
Change of variable, RHS = :
$$\int C|x\rangle \langle x-a|\phi\rangle dx$$

Take $a\to 0$, plug in to RHS:
$$\phi(x-a) = \phi(x) - a\frac{\partial}{\partial x}\phi(x)$$ 
and to LHS:
$$D(a) = 1-ia\hat{p}/\hbar$$

you can recover $\langle x|\hat{P}|\phi\rangle = -i\hbar\frac{\partial}{\partial x}\langle x|\phi\rangle$