How is there still gas in the atmosphere? The speed of molecules in the atmosphere vary, and can exceed the escape velocity of the earth, $11\:\mathrm{km\:s^{-1}}$
If this happens, and has been happening for millions of years, how hasn't all of the gas escaped? Is there gas re-entering?
Is the process so slow the effects are negligible?
 A: The lighter gases in the atmosphere (hydrogen, helium) do escape and are far less abundant than in the universe generally. To escape gravity any object needs to reach a speed of 11 km/s. The heavier molecules left in the atmosphere ($O_2, N_2, H_2O, CO_2$) have very little chance of reaching escape speed by chance, based on the average atmospheric temperature. (see typical speeds of various atoms in Maxwell Botzmann distribution at 298K.)
Other factors are the Earth's magnetic field, which shields the atmosphere from the cosmic wind, and the stabilising effect of life on the surface of the planet, which interacts with the atmosphere. There is also a continuous supply of gases from volcanic activity and radioactivity within rocks inside the Earth. All of these effects have reached a dynamic equilibrium which changes little over thousands of years.
A: There are two main groups of processes leading to atmospheric escape: thermal and non-thermal processes.
The first group includes Jeans escape, where particles with high thermal energies (and thus high kinetic energies) manage to reach speeds in the upper atmosphere greater than escape velocity. The equation for the Jeans flux for particles of mass $m$ is
$$\phi_J(m)\propto n_c\sqrt{\frac{2kT}{m}}\left(1+\frac{GMm}{kTr}\right)\exp\left(-\frac{GMm}{kTr}\right)$$
to within an order of magnitude or so. This shows that the flux strongly favors lower-mass molecules, including hydrogen and helium (possibly in molecular form).
Non-thermal processes include collisions and interactions with charged particles, possibly from the solar wind. Again, lower-mass particles are favored to take part in these interactions. This may be mitigated by the presence of a magnetosphere, which can shield particles. Impact erosion is another possibility, and may have been important early in the Solar System when large impacts were frequent.
All of this means that the Earth and the other terrestrial planets should indeed have lost some of their atmospheres now . . . but mainly the hydrogen and helium components of the original envelope.

Is the process so slow the effects are negligible?

For more massive molecules, yes. The proportionality constant for Jeans flux is $\frac{B}{2\sqrt{\pi}}$ for some efficiency $B$, which we can take to be $1$, for a worst-case scenario. We'll also assume a mean temperature of $\sim1000\text{ K}$. We therefore find
$$\sqrt{\frac{2kT}{m}}\sim770\text{ m/s},\quad\text{N}_2$$
$$\sqrt{\frac{2kT}{m}}\sim720\text{ m/s},\quad\text{O}_2$$
Placing the lower edge of the exosphere at about $500$ kilometers above Earth's surface ($r=R_e+500,000\text{ m}$) means that
$$\frac{GMm}{kTr}\sim196,\quad\text{N}_2$$
$$\frac{GMm}{kTr}\sim225,\quad\text{O}_2$$
Substituting in, we get
$$\phi_J\sim3.23\times10^{-81}\times n_{\text{N}_2}\text{ m}^{-2}\text{ s}^{-1},\quad\text{ N}_2$$
$$\phi_J\sim8.82\times10^{-94}\times n_{\text{O}_2}\text{ m}^{-2}\text{ s}^{-1},\quad\text{ O}_2$$
Even when multiplied by the area of a sphere with radius $r$, this is many orders of magnitude too low. Jeans escape is not at all important.
For heavier molecules, dissociation and non-thermal escape is a more important cause of atmosphere loss. It seems like the consensus for oxygen loss is that $\sim10^{24}$ molecules of $\text{O}+$ are lost from Earth every second, most around the polar regions, though some oxygen is again returned to Earth's atmosphere (there is a net outflow). This might seem like a lot, and it is, compared to the results from Jeans escape, but it turns out that this is about the amount of molecules in one cubic meter of air.
The main source of this atomic oxygen is through dissociative recombination:
$$\text{O}_2^++e^-\to\text{O}+\text{O}+\text{energy}$$
which can create "hot" oxygen. I'm currently unaware of similar processes involving $\text{N}_2$ that occur at any significant rate on Earth, although the same reaction for nitrogen does apparently occur on Mars.
References

*

*Gaidos & Yung (2003)

*Melosh & Vickery (1989)

*Seki et al. (2001)

*Shizgal & Arkos (1996)
