The pressure gradient is the force that is produced due to the rotation of earth pressure cells that creates lighter air to move upwards and heavier to move downwards due to the difference in densities of air.
As the air above consists of lighter elements the oceanic air mostly consist of diatomic molecules of oxygen and nitrogen thus containing a large amount of water vapor, all these molecules have a mass that are pulled down by the gravity and this pull of gravity on columns of gas applies a force what we see an atmospheric pressure.
The gas particles and molecules of heavy and denser matter get stuck at the ground, similarly, as the air cools is descends and warm air rises. Thus upwards and downward motion of air causes convergence and divergence of molecules.