  We argue that the study of heavy quarkonia, in particular that of $\Upsilon$,
produced back-to-back with an isolated photon in $pp$ collisions at the LHC is
the best --and currently unique-- way to access the distribution of both the
transverse momentum and the polarization of the gluon in an unpolarized proton.
These encode fundamental information on the dynamics of QCD. We have derived
analytical expressions for various transverse-momentum distributions which can
be measured at the LHC and which allow for a direct extraction of the
aforementioned quantities. To assess the feasibility of such measurements, we
have evaluated the expected yields and the relevant transverse-momentum
distributions for different models of the gluon dynamics inside a proton.
