Yes sir, there is a connection but it is not a direct one.
Atmosphere cannot be considered as a single layer, Since it is a composed of number of chemical gases, each with different molecular mass it behaves as a gas mixture.
The escape velocity of a planet at the surface depends on its mass and radius, given by vesc= (2GM/R)0.5 .
From the kinetic theory of gases, for a given temperature, the average velocity of a molecule in a gas mixture is given as vav= (3kT/m)0.5 , where m here is the molecular mass, T is the temperature and k is the Boltzmann constant.
If the average velocity of the molecules of a particular element is much less than the escape velocity of the planet, then is retained for long periods of time by the planet thus becoming a component of its atmosphere.
Note: Since the thermal energy of the gas follows a distribution, at any point of time there will be a small fraction of molecules with velocities higher and comparable to the escape velocity, hence some may escape.
Thus it is very rare to find lighter gases like hydrogen and helium in the atmospheres of low mass planets as their average velocities will be much higher than those of the heavier elemental gases.
So there is a connection between the escape velocity and the chemical composition of the atmosphere of a planet, which is an indirect link between the gravitational potential and the atmosphere.
There are more issues relative to atmospheric density (the amount of gas retained by a planet). An interesting event happened decades ago where NASA sent a probe to Mars to measure its atmospheric extent for a future "aero-braking" probe (to know where to sent the future craft to effectively use a large balloon to slow the craft before entering the martian atmosphere). When the aero-braking craft finally arrived 10 years later the atmosphere of Mars had doubled in size. The issue is that the planets are accumulating atmosphere (and other materials) all the time. Lou Frank of Iowa was famous for his experiment using UV light identifying influx of water into earth's atmosphere. Our moon (as does Mercury ) sports a sodium tail that is not bound by standard gravity as in the general gas equations. Using classical physics one could calculate the size and extent of a particular planetary atmosphere (which has a very broad range of parameters), but you then run into all kinds of contradictions. Take Earth and Venus for example. Venus has a smaller surface gravity than Earth yet has an atmosphere 1000 times denser but oddly enough is extremely hot. You can debate over how all of this got this way, but assuming that these are the original atmospheres of these planets, you can retro-calculate that Venus must have had a really massive atmosphere if it really is 4.5 billion years old. Do this little exercise and see where you end up. It is shocking and really unbelievable when using the standard equations based on surface gravity and velocity distributions and allowing for cooling with loss at the high end of the velocity distribution curve. You can also estimate that Earth had a much smaller cooler atmosphere. But then again no one can tell you really where any of the planetary atmospheres came from since according to standard theory of planetary formation, any volatiles would have escaped during the early bombardment phase of planet formation and none of the planets would have had any atmospheres at all to begin with. So where did the atmospheres (and earth oceans) come from? Clearly something else is going on here. The standard equations are useful in understanding rates of loss but do not tell anything about where the atmospheres really came from or their growth. One last thought on earth's situation is the question ... if water is coming into earth's atmosphere at the rate estimated by the Lou Frank data, what is happening to all that water? It turns out that it ends up at the north and south poles building up the ice caps. Using a hydrological cycle, water cycles to the poles where it freezes. During WWII, a group of fighter planes were force landed at the north polar region. Decades later the pilots decided to go up and find the planes and fly them out as salvage. When they got to the exact location, the planes were nowhere to be found. They started digging and found them deep in the ice buried by decades of ice accumulation.