We argue that the study of heavy quarkonia, in particular that of Υ, 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 derive analytical expressions for various transverse-momentum distributions that 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 evaluate the expected yields and the relevant transverse-momentum distributions for different models of the gluon dynamics inside a proton. © 2014 American Physical Society.