Classical mechanics (CM), like quantum mechanics (QM), can have an operatorial formulation. This was pioneered by Koopman and von Neumann (KvN) in the 1930s. They basically formalized, via the introduction of a classical Hilbert space, earlier work of Liouville who had shown that the classical time evolution can take place via an operator, nowadays known as the Liouville operator. In this paper we study how to perform the coupling of a point particle to a gauge field in the KvN version of CM. So we basically implement at the classical operatorial level the analog of the minimal coupling of QM. We show that, differently than in QM, not only the momenta but also other variables have to be coupled to the gauge field. We also analyze in detail how the gauge invariance manifests itself in the Hilbert space of KvN and indicate the differences with QM. As an application of the KvN method we study the Landau problem proving that there are many more degeneracies at the classical operatorial level than at the quantum one. As a second example we go through the Aharonov-Bohm phenomenon showing that, at the quantum level, this phenomenon manifests its effects on the spectrum of the quantum Hamiltonian while at the classical level there is no effect whatsoever on the spectrum of the Liouville operator.