I want to solve the following PDE:
$$\begin{align} u_{tt}&=c^2u_{xx}-\gamma u_x, \quad 0<x<1, \quad t>0,\\ \\ u(0,t)&=u(1,t)=0, \\ u(x,t=0)&=x(1-x),\\ u_t(x,t=0)&=0. \end{align}$$
Though I see the literature has examples with the damped wave equation, I don't have an explanation for the $-\gamma u_x$ term. How would I solve it?
One can, as I mentioned in the comment above, do the problem by Fourier series.
One can however to a funny change of variables to convert the equation to one that is perhaps better studied.
We observe the following fact:
$$ (c \partial_x - \frac{\gamma}{2c})(c\partial_x - \frac{\gamma}{2c}) = c^2 \partial^2_{xx} - \gamma \partial_x + \frac{\gamma}{4c^2} $$
which means that your equation can be re-written as
$$ u_{tt} = (c \partial_x - \frac{\gamma}{2c})(c\partial_x - \frac{\gamma}{2c})u - \frac{\gamma}{4c^2}u $$
Now, we have that
$$ c \partial_x u - \frac{\gamma}{2c} u = c e^{\gamma x / (2c^2)} \partial_x \left( e^{- \gamma x/(2c^2)} u\right) $$
which rewrites the equation as
$$u_{tt} = e^{\gamma x / (2c^2)} c^2 \partial^2_{xx} \left(e^{-\gamma x /(2c^2)}u\right) - \frac{\gamma}{4c^2}u $$
So we make the substitution $v(x,t) = e^{-\gamma x / (2c^2)} u(x,t)$. The equation for $v$ is simply the following Klein-Gordon equation
$$ v_{tt} = c^2 v_{xx} - \frac{\gamma}{4c^2} v $$
with the boundary conditions
$$ v(0,t) = v(1,t) = 0 $$
and the initial values
$$ \begin{align} v_t(x,0) &= 0 \\ v(x,0) &= e^{-\gamma x / (2c^2)} x(1-x) \end{align}$$