Why do gases have weight?
Imagine a gas molecule in a closed box bouncing vertically between the top and bottom of the box. Let's suppose the mass of the gas molecule is $m$ and its speed at the top of the box is $v_t$.
When the gas molecule moving upwards hits the top of the box and bounces back the change in momentum is $2mv_t$. If it does this $N$ times a second then the rate of change of momentum is $2Nmv_t$, and rate of change of momentum is just force, so the upwards force the molecule exerts is:
$$ F_\text{up} = 2Nmv_t $$
And the same argument tells us that if the velocity of the molecule at the bottom of the box is $v_b$, then the downwards force it exerts on the bottom of the box is:
$$ F_\text{down} = 2Nmv_b $$
So the net downwards force is:
$$ F_\text{net} = 2Nmv_b - 2Nmv_t = 2Nm(v_b - v_t) \tag{1} $$
But when the molecule leaves the top of the box and starts heading downwards it is accelerated by the gravitational force so when it reaches the bottom it has speeded up i.e. $v_b \gt v_t$. So that means our net downward force is going to be positive i.e. the molecule has a weight.
We can make this quantitative by using one of the SUVAT (see 'Physics For You' by Keith Johnson) equations:
$$ v = u + at $$
Which in this case gives us:
$$ v_b - v_t = gt $$
where $t$ is the time the molecule takes to get from the top of the box to the bottom. The number of times per second it makes this round trip is:
$$ N = \frac{1}{2t} $$
Substituting these into our equation (1) for the force we get:
$$ F_\text{net} = 2 \frac{1}{2t} m(gt) = mg $$
And $mg$ is of course just the weight of the molecule.
Think of the atmosphere as if it were an ocean. You might not think water has weight if you were diving underwater, but obviously when you fill up your cup with water you feel its weight increase. The atmosphere is really just a gaseous ocean on top of the surface. In extension, if you were to light a candle on the edge of a building taller than the Earth's atmosphere (assuming you had an oxygen source), you would see the smoke fall towards the Earth.
Here is a short answer: Imagine you would have an empty box (i.e. vacuum), that you would put on a weighing scale. It would have some weight. Now, if you would insert some gas into it, the measured weight would increase exactly by the mass of the gas times gravity.
Historically, this is quite an important point when they burned stuff (solid to gas) in a closed box on a weighing scale, and figured out that there was no measurable loss of weight.
On a microscopic scale, the explanation (see other answers for details, here's the short form) is simply that each molecule hits the bottom with greater speed than the top of the box, due to continuous acceleration towards the bottom. In fact, this has the side effect that the pressure at the top is slightly lower than the pressure at the bottom. Btw, this difference in pressure just equals the weight of the gas. This pressure difference becomes obvious if the box is very high, let's say ... the height of our atmosphere.
Lastly, the "reason" that molecules don't pile up is that collisions on a molecular level are quite different from collisions of let's say balls at macroscopic scale. At molecular level, there is no net energy loss due to friction or plastic deformation (assuming equal temperature). To phrase it a bit exaggerated: Collisions of molecules are perfectly elastic (not exactly true, but good enough for the point here), so they bounce forever.