Earth's atmosphere does escape over time, albeit very slowly.
The distribution of kinetic energies of molecules in a gas obeys (more or less) a Maxwell-Boltzmann distribution. Notice that the graph is asymptotic, so in a suitably large population of gas molecules, there is a non-zero probability that some of those molecules will have a an arbitrarily large kinetic energy. This implies that in the population of gas molecules constituting Earth's atmosphere, some of them will have kinetic energy such that their velocity exceeds the Earth's escape velocity and provided that their paths are oriented away from any obstacles (including the Earth's surface itself) and they don't collide with anything, those molecules can escape. On average, only a small number of molecules will actually achieve all these conditions. The end result is that atmosphere does indeed escape, but the effect is tiny - only on the order of grams per second due to the process described above according to this article I found.
This is not the only process responsible however, phenomena like the solar wind also have a role in liberating gas molecules from the Earth's atmosphere.
The effect is much more pronounced on other rocky planets in the Solar system, for example Mercury has very little atmosphere due to it i) being extremely hot and ii) being bombarded by highly energetic particles from the sun much more than we are. Similarly, Mars has a predominantly carbon dioxide atmosphere that is thought to have been much thicker in the past than it is now, and therefore must have escaped somehow (assuming you don't believe stories like Total Recall where the atmosphere is intentionally held captive ;) - although in fact the Martian atmosphere does condense at the poles leading to a significant amount of atmospheric agitation with the changing of the seasons)