These definitions are consistent, though it's not immediate.

The conductor quantifies the extent to which $\pi$ is ramified. As an aside, I prefer to write $c(\pi)$ for the conductor exponent of $\pi$, which is a nonnegative integer, so that $\mathfrak{p}^{c(\pi)}$ is the conductor of $\pi$, and $q^{c(\pi)}$ is the absolute conductor of $\pi$, where $q = N(\mathfrak{p}) = \# \mathcal{O}_F / \mathfrak{p}$. This isn't standard terminology though, as these are all unfortunately called the same thing by different people.

The conductor exponent is tied to a distinguished vector in $\pi$, called the newform of $\pi$. (It is also called the Whittaker newform, the essential Whittaker function, the newvector, or the essential vector; the terminology here hasn't reached a consensus, but newform is best in my opinion because for $\mathrm{GL}_2$, it is the local component of a classical newform.) There are two definitions of the newform of $\pi$, which are equivalent. I'll state them for $\mathrm{GL}_n$ instead of $\mathrm{GL}_2$. Throughout, $n \geq 2$ and $F$ is a nonarchimedean local field.

- Recall that for a spherical (that is, unramified irreducible principle series) representation $\pi'$ of $\mathrm{GL}_{n-1}(F)$, there exists a spherical vector $W'^{\circ}$ in the Whittaker model $\mathcal{W}(\pi',\overline{\psi})$ of $\pi'$, so that $W'^{\circ}(1_{n-1}) = 1$ and $W'^{\circ}(gk) = W(g)$ for all $g \in \mathrm{GL}_{n-1}(F)$ and $k \in K_{n-1} = \mathrm{GL}_{n-1}(\mathcal{O}_F)$; that such a vector exists and is unique is classical. Now let $\pi$ be a (possibly ramified) generic irreducible admissible representation of $\mathrm{GL}_n(F)$. Then there exists a unique Whittaker function $W^{\circ}$ in the Whittaker model $\mathcal{W}(\pi,\psi)$ of $\pi$ satisfying
\[W^{\circ} \left(g \begin{pmatrix} k & 0 \\ 0 & 1 \end{pmatrix}\right) = W^{\circ}(g), \qquad W^{\circ}(1_n) = 1\]
for every $g \in \mathrm{GL}_n(F)$ and $k \in K_{n-1}$ such that for every spherical representation $\pi'$ of $\mathrm{GL}_{n-1}(F)$ with associated spherical vector $W'^{\circ}$, the Eulerian integral
\[\Psi(s,W^{\circ},W'^{\circ}) = \int\limits_{N_{n-1}(F) \backslash \mathrm{GL}_{n-1}(F)} W^{\circ} \begin{pmatrix} g & 0 \\ 0 & 1 \end{pmatrix} W'^{\circ}(g) |\det g|^{s - 1/2} \, dg\]
is equal to the Rankin-Selberg $L$-function $L(s, \pi \times \pi')$. $W^{\circ}$ is called the newform of $\pi$. (In general, $\Psi(s,W,W')/L(s,\pi \times \pi')$ is a polynomial in $q^{-s}$; the point is that there exists a distinguished choice of $W \in \mathcal{W}(\pi,\psi)$, $W' \in \mathcal{W}(\pi',\overline{\psi})$ for which this polynomial is equal to $1$.)
- For a nonnegative integer $m$, let $K_1(\mathfrak{p}^m)$ denote the congruence subgroup of $K_n = \mathrm{GL}_n(\mathcal{O}_F)$ given by
\[\left\{\begin{pmatrix} a & b \\ c & d \end{pmatrix} \in K_n : c \in \mathrm{Mat}_{1 \times n-1}(\mathfrak{p}^m), \ d - 1 \in \mathfrak{p}^m \right\}.\]
(Note that necessarily $a \in K_{n-1}$ and $b \in \mathrm{Mat}_{n-1 \times 1}(\mathcal{O}_F)$.) Let $\pi$ be a (possibly ramified) generic irreducible admissible representation of $\mathrm{GL}_n(F)$. Then there exists a minimal $m$ for which the vector subspace
\[\pi^{K_1(\mathfrak{p}^m)} = \left\{v \in \pi : \pi(k) \cdot v = v \quad \text{for all $k \in K_1(\mathfrak{p}^m)$}\right\}\]
of $\pi$ is not equal to $\{0\}$. We denote by $c(\pi)$ this minimal $m$. Then $\pi^{K_1(\mathfrak{p}^{c(\pi)})}$ is one dimensional, so that there exists a unique Whittaker function $W^{\circ}$ in the Whittaker model $\mathcal{W}(\pi,\psi)$ of $\pi$ satisfying
\[W^{\circ} (gk) = W^{\circ}(g), \qquad W^{\circ}(1_n) = 1\]
for every $g \in \mathrm{GL}_n(F)$ and $k \in K_1(\mathfrak{p}^{c(\pi)})$.

The original proof of the existence and uniqueness of the newform $W^{\circ}$ of $\pi$ is via (1), in the paper Conducteur des répresentations du group linéaire by Jacquet, Piatetski-Shapiro, and Shalika. However, it was noticed by Matringe several years ago that the proof was in fact incomplete. He gave a correct proof, as did Jacquet.

In the last section of Jacquet, Piatetski-Shapiro, and Shalika's paper, they show that (1) implies (2) via the functional equation for $L(s,\pi \times \pi')$. They make use of the fact that the epsilon factor $\epsilon(s,\pi \times \pi',\psi)$ is equal to $\epsilon(1/2, \pi \times \pi',\psi) q^{-(n - 1) c(\pi) (s - 1/2)}$ for some nonnegative integer $c(\pi)$, and it is precisely this nonnegative integer $c(\pi)$ that satisfies $\pi^{K_1(\mathfrak{p}^{c(\pi)})} \ni W^{\circ}$ and $\pi^{K_1(\mathfrak{p}^m)} = \{0\}$ for all $m < c(\pi)$.

I don't know if the fact that (2) implies (1) has appeared anywhere in print, but I do know how to prove it. There is a paper by Miyauchi that shows that the (Whittaker) newform $W^{\circ}$ given by (2) is such that
\[\Psi(s,W^{\circ}) = \int_{F^{\times}} W^{\circ} \begin{pmatrix} x & 0 & \cdots & 0 \\\ 0 & 1 & \cdots & 0 \\\ \vdots & \vdots & \ddots & \vdots \\\ 0 & & \cdots & 1 \end{pmatrix} |x|^{s - \frac{n - 1}{2}} \, d^{\times} x\]
is equal to the $L$-function $L(s,\pi)$, and the same method of proof (using Hecke operators) shows that $\Psi(s,W^{\circ},W'^{\circ}) = L(s, \pi \times \pi')$ for all spherical representations $\pi'$ of $\mathrm{GL}_{n-1}(F)$. Now you can work backwards to show that $\epsilon(s,\pi \times \pi',\psi)$ is equal to $\epsilon(1/2, \pi \times \pi',\psi) q^{-(n - 1) c(\pi) (s - 1/2)}$, as in Martin Dickson's answer.