The earth,s atmosphere is finite. Thus its mass is the same, no matter what its density might be.
Gravity is said to be inexorably tied to mass, not density. Giant gas planets have a gravitational pull that correlates with their mass, not their density. Although, that is not necessarily correct, in that their mass has been back calculated based upon the strength of their gravitational pull.