Why don't molecules of a gas settle? It is said that the constant interaction between the molecules of a gas (in the form of collisions) acts as a randomising influence and prevents the gas molecules from settling. But given the force of gravity, won't the gas molecules settle at some point of time? 
 A: You are used to all collisions being somewhat lossy – that is, when you think of most collisions, a little bit of the kinetic energy is lost at each collision so the particles will slow down. If they are subject to gravity, they will eventually settle.
By contrast, the collisions between gas molecules are perfectly elastic – for a non-reactive gas (mixture), there is no mechanism by which the sum of kinetic energies after the collision is less than before. *
Even if an individual gas molecule briefly found itself at rest against the bottom of the container, the thermal motion of the molecules of the container would almost immediately give it a "kick" and put it back into circulation.
There is a theorem called the equipartition theorem that tells us that for each degree of freedom, the gas molecules will on average contain $\frac12 kT$ of energy. This is an average – individual molecules may at times have more or less. But the average must be maintained – and this means the gas molecules keep moving.
One way you can get the molecules of the gas to settle at the bottom of the container would be to make the walls of the container very cold – taking thermal energy away, the molecules will eventually move so slowly that the effect of gravity (and intermolecular forces) will dominate. That won't happen by itself – you need to remove the energy somehow.
To estimate the temperature you would need: for a container that is 10 cm tall, the gravitational potential energy difference of a nitrogen molecule is $mgh = 1.67\cdot 10^{-27}\ \mathrm{kg}\cdot 28 \cdot 9.8\ \mathrm{m\ s^{-2}}\cdot 0.1\ \mathrm m= 4.6\cdot 10^{-26}~\mathrm{J}$. Putting that equal to $\frac12 kT$ gives us a temperature of 
$$T = \frac{2 m g h}{k} = 3.3\ \mathrm{mK}$$
That's millikelvin. So yes – when things get very, very cold, gravity becomes a significant factor and air molecules may settle near the bottom of your container.

* Strictly speaking, this is a simplification. With sufficient energy, some collisions can lead to electronic excitation and even ionization of the molecules. The de-excitation of these states can result in radiative "loss" of energy, but if the system is truly closed (perfectly isolated) the radiation will stay inside until it's re-absorbed. Still, this means that, at least for a little while, kinetic energy may appear to be "lost". Similarly, there are some vibrational modes for molecules that get excited at sufficiently high energy/temperature; in these modes, energy moves from "kinetic" to "potential" and back again – so that it is not "kinetic" for a little bit of the time. 
An important consideration in all this is "what is the temperature of anything that the gas can exchange energy with". That is not just the walls of the container (although their temperature is very important), but also the temperature of anything the gas "sees" – since every substance at non-zero temperature will be a black body emitter (some more efficiently than others), if the gas can exchange radiation with a cooler region, this will provide a mechanism for the gas to cool. And if the gas gets cold enough, gravity wins. 
A: Based on the various comments, I think it's worth noting that even molecules in a solid don't "settle" — they too are constantly in rapid motion.
The difference between a solid and a gas is that, in the solid, each molecule is confined to a small volume through interactions with nearby molecules.
When a solid appears to "settle", what's really happening is that all of the obvious macroscopic motion simply gets converted into making the individual molecules vibrate faster within their confines. (with some energy lost due to transferring the momentum to the surrounding air particles)
A: Classical physics.
The probability of finding a molecule at some height $h$ is proportional to the density $\rho(h)$, which can be calculated. A column of air from floor to ceiling weighs $\rho gh A$,
where $\rho$ is the average density, $g$ is acceleration due to gravity =$9.8 m/sec^2$, $h$ is the height of the room $=3m$ and $A$ is the arbitrary area of the column. This weight is supported by a force $A dp$, where $dp$ is the pressure difference floor to ceiling, and for an ideal gas at constant temperature $T=293K$ this is als0 $RTd\rho$. Here $R$ is the gas constant $=287 J/kg^{-1}K^{-1}$ for air. So equating the force to the weight gives$$\frac{d\rho}{\rho}=\frac{3\times 9.8}{287\times293}=3.5\times 10^{-4}$$ 
and this gives the ratio of densities at ceiling and floor as 0.9996, just the same as the solution by Michael Seifert. Isnt physics wonderful?
How does this answer the question? The pressure exerted by a gas (on itself as well as on a wall) is caused by the random jostling of molecules. Loosely, it is the kinetic energy of the molecules in unit volume. There are slightly fewer molecules at the ceiling, but they are jostling just as vigorously because they are at the same temperature (and temperature = jostling per molecule). The diminishing pressure and the diminishing density just balance out. You can extend this argument to find the pressure and density all the way up through the atmosphere, although there is more to be accounted for then than when just considering the air in a room. 
EXPANSION OF ANSWER
There have been some good answers to this question, and some..not quite so good.
Consider that the definition of a gas is that of a substance that will expand to fill any container that it is placed in. If the container is not closed, it will (slowly perhaps) leak out. Take some time to consider if this is a definition that you can agree with. It would follow from this definition that a gas will expand to fill any container you put it in, whether or not another gas is already there. It will just occupy the spaces
Now imagine that a container of sodium hexafluoride is placed in the middle of the floor and the stopper is removed. Within a few minutes almost all of the $SF_6$ will have replaced by air. In fact the percentages will be same in the container and in the room. Think carefully whether you accept this.
Now look to see which answers can explain this, not forgetting what the definition of a gas is.
Last point. if you cool a gas sufficiently it becomes a liquid. At this temperature the molecules no longer behave independently but form transient 
bonds, and the result is a liquid that has a definite volume and settles at the bottom of any container. Cool it some more and the bonds become permanent although not quite rigid. Then we call it a solid.
A: In fact, particles in a box of gas are slightly denser at the bottom than they are at the top.  In general, the probability of finding a particle with a total energy of $E$ is proportional to the Boltzmann factor:
$$
P(E) \propto e^{-E/kT}.
$$
In particular, the potential energy of a gas molecule is $mgh$, where $h$ is the height above some fixed point (the "floor" of the box, say.)  If we consider the relatively probabilities of a particle to be found at the floor of a box ($h = 0$) versus being found at a height $h$ above the bottom of a box, we will have
$$
\frac{P(h)}{P(0)} = \frac{e^{-mgh/kT}}{e^{0}} = e^{-mgh/kT}.
$$
Thus, the densities of the gas molecules is lower at a height $h$ than it is near the floor, since they are less likely to be found at these heights.
The problem is that this factor is tiny for typical temperatures and masses of gas molecules.  For the air in my office, we have $m \approx 32$ amu (the mass of an oxygen molecule, $h \approx 3$ m (the height from floor to ceiling), and $T \approx 293$ K.  Plugging these all in, we get that the density of the air at the ceiling is 99.961% of the density at the floor.
A: Gas molecules dont settle because they have too much kinetic energy. As time goes on, that energy (heat) dissipates, and the molecules do 'settle.' When this occurs they become a liquid or a solid. When gas 'settles' as you describe, it is no longer a gas. However, its worth noting that dense gases do 'settle' beneath less dense gases in much the way you describe, although they are still gases and the molecules do take up volume they would not in solid or liquid form.
A: Let's assume the collisions are elastic. The average influence of gravity on the momenta of the particles is zero in the vertical direction of motion of the molecules. The particles' vertical components of their momenta are changed by the same amount (on the average), but opposite in direction, so gravity doesn't influence the vertical moment composed of all the particles' vertical momenta.
The horizontal components of the particles' momenta are all changed into a downward direction by gravity (between collisions). So gravity enhances the momenta of the molecules (because the vertical change of all the particles' momenta is zero on the average). So the momentum of each molecule is increased (let's not consider the equipartition theorem), which means the gas is getting warmer, wich is no surprise if gravity is acting on it: the horizontal velocity of an object moving in horizontal direction, with zero velocity in the vertical direction (let's not forget the changes in vertical momenta in the gas caused by gravity are on the average cancelled out) is always changed downwards by gravity, giving the object a higher momentum, and thus $E=\frac {p^2} 2m$.
So in the ideal condition that the collisions are elastic, the gas is actually being heated up by the influence of gravity. Off course the collisions are not elastic, so at each collision, the molecules lose energy, and this loss is bigger than the increased energy of the molecules by gravity. We can conclude that the loss in energy due to collisions between the gas particles is equal or bigger than the gain in energy by gravitation. This would happen if the sun weren't there to constantly heat the gas of the atmosphere, which isn't actually the case so the atmosphere is constantly heated by the sun. With the result that the atmospheric gas won't settle.
A: Yes, without a heat source the molecules in a gas will cool and settle in a gravitational field.
Collisions between molecules are only elastic insofar as they conserve overall energy. Energy can still be transferred between translational kinetic energy and the vibrational and rotational energy levels of molecules, or if the gas is hot enough, into electronic transitions in atoms. These excitations can then de-excite radiatively and that radiation can escape from the gas.
However a gas in thermal equilibrium will not settle (beyond the small settling effect correctly identified by Michael Seifert) because the energy lost by radiation will be balanced by input from whatever container the gas is held in, in the form of collisions with the walls and absorption of radiation from the walls.
If you have no container - for example a molecular cloud in outer space - then the settling process can take place. Molecular clouds can reach temperatures as low as the microwave background, but even at this temperature, may have sufficient internal energies and turbulence to support themselves against total collapse. Others don't and that's how stars form 
