  We report a lattice QCD determination of the $\pi\gamma \to \pi\pi$
transition amplitude for the $P$-wave, $I=1$ two-pion final state, as a
function of the photon virtuality and $\pi\pi$ invariant mass. The calculation
was performed with $2+1$ flavors of clover fermions at a pion mass of
approximately $320$ MeV, on a $32^3 \times 96$ lattice with $L\approx 3.6$ fm.
We construct the necessary correlation functions using a combination of smeared
forward, sequential and stochastic propagators, and determine the finite-volume
matrix elements for all $\pi\pi$ momenta up to $|\vec{P}|= \sqrt{3}
\frac{2\pi}{L}$ and all associated irreducible representations. In the mapping
of the finite-volume to infinite-volume matrix elements using the
Lellouch-L\"uscher factor, we consider two different parametrizations of the
$\pi\pi$ scattering phase shift. We fit the $q^2$ and $s$ dependence of the
infinite-volume transition amplitude in a model-independent way using series
expansions, and compare multiple different truncations of this series. Through
analytic continuation to the $\rho$ resonance pole, we also determine the
$\pi\gamma \to \rho$ resonant transition form factor and the $\rho$ meson
photocoupling, and obtain $|G_{\rho\pi\gamma}| = 0.0802(32)(20)$.
