Let's see if I can remember how to do this...
To figure out whether the gravity of a planetary body is sufficient to retain a given component of the atmosphere in the long run, we compare the thermal kinetic energy and the gravitational potential energy of a molecule. If the kinetic energy is greater, the element is lost pretty much as soon as it is released. If the potential energy is greater, the element is held on to in the short run, but there'll always be some leakage from to the "long tail" of the thermal energy distribution. What that means is that, at any given time, while most molecules will have kinetic energies which correspond more or less to the temperature of the atmosphere, there will always be a few that happened to pick up a lot of excess kinetic energy and so correspond to a much higher temperature.
So, on the one hand, the mean kinetic energy is given by (3/2) k T, where k is Boltzmann's constant.
On the other hand, the gravitational potential is given by G M m / R, where G is the Gravitational constant, M and R the mass and radius of the planetary body, and m the mass of the molecule.
Equating and solving for the temperature, that gives T = (2G/3k) (M/R) m
Plugging in the values for Earth, we get T ~ 5,000 K * RM
Plugging in the values for the Moon, we get T ~ 250 K * RM
In these expressions, RM is the relative molecular weight for the atmospheric component in question, which is simply the total count of protons and neutrons in a molecule. For diatomic hydrogen, that's 2, for helium, 4, for diatomic oxygen, 32.
As mentioned, if these expressions yield a temperature which is less than the temperature of the atmosphere, it means that the element is lost straight away. If it's more, molecules will still leak out, and the ratio of the two temperatures indicates how long it'll take for most of them to be gone. Doing this rigorously takes quite a bit of statistical physics, but IIRC the rule of thumb is that temperatures within one order of magnitude above that of the atmosphere mean that the component is lost "very quickly" (within a year?), while temperatures in excess of two orders of magnitude above that of the atmosphere mean that the component is retained "almost indefinitely" (for billions of years).
So, let's see what that gives us. For Earth:
T_H2 ~ 10,000 K
T_He ~ 20,000 K
T_O2 ~ 160,000 K
Our atmosphere has a temperature between 200 K and 300 K, so this tells us that Hydrogen and Helium do escape, though only slowly, while oxygen is retained "almost indefinitely" - which agrees with what we observe.
For the Moon:
T_H2 ~ 500 K
T_He ~ 1,000 K
T_O2 ~ 8,000 K
Assuming the same atmospheric temperature, that means that Hydrogen and Helium escape after a negligible amount of time, and that even oxygen is closer to the "very quickly" than to the "almost indefinitely" side of things. Moon would do a worse job of holding on to oxygen than Earth does with regards to Hydrogen.
Conclusion: The Moon's gravity isn't quite weak enough to rule out an Earth-like atmosphere altogether, but it'd leak like a sieve and thus would need constant replenishment. As terraforming projects go, this one would be truly "sisyphean".