Gatheral leaves out something important and it makes all the difference for the derivation but not the final result. Specifically, on pg. 17 he states the following, $$\hat{P}(u,v,0)=\int_{-\infty}^\infty\Theta(x)e^{-iux}dx=\frac{1}{iu},$$ where $\Theta(x)$ is the Heaviside unit step function (as defined in his Eq. 2.7, take a look at his definition and convince yourself that it is basically the same as Wikipedias). But this is not true - there is a Dirac delta missing. See rule 313 column 3 on WP - Tables of important Fourier transforms. The equation should be: $$\hat{P}(u,v,0)=\int_{-\infty}^\infty\Theta(x)e^{-iux}dx=\frac{1}{iu}+\pi\delta(u),$$ where $\delta(x)$ is the Dirac delta distribution. Next, we have $$\hat{P}_j(u,v,t)=\exp(C[u,\tau]\bar{v}+D[u,\tau]v)\hat{P}_j(u,v,0)\\
=(\frac{1}{iu}+\pi\delta[u])\exp(C[u,\tau]\bar{v}+D[u,\tau]v).$$ Then $$\int_{-\infty}^\infty \frac{e^{iux}}{2\pi}\hat{P}_j(u)\text{d}u = \int_{-\infty}^\infty \frac{e^{iux}}{2\pi}(\frac{1}{iu}+\pi\delta[u])\exp(C[u,\tau]\bar{v}+D[u,\tau]v)\text{d}u.$$ Lets split this into two parts. Lets consider the integral over the delta function first. Noting that $C(0,\tau)=0$ and $D(0,\tau)=0$ we have $$ \int_{-\infty}^\infty \frac{e^{iux}}{2\pi}(\pi\delta[u])\exp(C[u,\tau]\bar{v}+D[u,\tau]v)\text{d}u=\frac{1}{2}.$$ Now consider the part with $\frac{1}{iu}$. Let $$\hat{P}'_j:=\frac{1}{iu}\exp(C[u,\tau]\bar{v}+D[u,\tau]v)$$
The important thing to notice is, assuming $j,\rho,\eta,\lambda$ and $\tau$ are real, that $r_\pm(u)$ is conjugate-even in $u$. That is, $r_\pm(-u)=r_\pm^\ast(u)$, where $\ast$ denotes complex conjugate. Then g and d and therefore $D$ and $C$ and therefore $\hat{P}'_j$ are conjugate-even. I make the additional assumption that $\bar{v}$ indicates the mean of the real parameter $v$ and not the complex conjugate. Then, $$\int_{-\infty}^\infty \frac{e^{iux}}{2\pi}\hat{P}'_j(u)\text{d}u = \int_{-\infty}^0 \frac{e^{iux}}{2\pi}\hat{P}'_j(u)\text{d}u + \int_{0}^\infty \frac{e^{iux}}{2\pi}\hat{P}'_j(u)\text{d}u \\ = \int_{0}^\infty \frac{e^{-iux}}{2\pi}\hat{P}'_j(-u)\text{d}u + \int_{0}^\infty \frac{e^{iux}}{2\pi}\hat{P}'_j(u)\text{d}u \\ = \frac{1}{2\pi}\int_{0}^\infty \left [ e^{-iux}\hat{P'}_j^\ast(u) + e^{iux}\hat{P}'_j(u) \right ]\text{d}u \\ = \frac{1}{\pi}\int_{0}^\infty \text{Re}\left[e^{iux}\hat{P}'_j(u) \right ]\text{d}u. $$ On the last line I have used the identity $2\text{Re}(z)=z+z^\ast$.
Putting it all together gives $$P_j(x,v,\tau)=\frac{1}{2}+\frac{1}{\pi}\int_{0}^\infty \text{Re}\left[e^{iux}\hat{P}'_j(u) \right ]\text{d}u,$$ which is the solution in the book.
Update:
If you remain unsatisfied and are skeptical that Gatheral omitted the delta, consider this:
On pg 19 Gatheral gives the conditions $C(u,0)=0$ and $D(u,0)=0$. Note again that according to his definition, $\hat{P}(u,v,0)=1/(iu)$. Then, using the inverse transform as he defines in Eq. 2.8, this gives $$\Theta(x)=\lim_{\tau \rightarrow 0}P_j(x,v,\tau)=\lim_{\tau \rightarrow 0}\int_{-\infty}^\infty \frac{1}{2\pi iu}\exp(C[u,\tau]\bar{v}+D[u,\tau]v)e^{iux}du\\=\int_{-\infty}^\infty \frac{1}{2\pi iu}e^{iux}du \\ = \frac{1}{2}\text{sgn}(x) \neq \Theta(x)$$ where on the last line we used the inverse transform version of rule 309 on the WP fourier transform page. Notice that this answer is off by exactly $1/2$! That is, $1/2+ (1/2)\text{sgn}(x)=\Theta(x)$. In other words, Gatheral omitted the delta and his derivation as printed is not self-consistent. It should be noted, however, that the omission does not affect his final result (which remains valid).