Does oxygen and carbon dioxide separate in a closed box? If I have "air" in a closed box, does oxygen and carbon dioxide get separated over time? Does oxygen fill upper part of box and carbon dioxide lower part of box?
How about if upper part of box is warmer (~90C) than lower part of box (~50C)?
 A: No. You can check for yourself that the lowest 4 meters of the atmosphere are not pure $CO_2 $. No life would be possible in the most populated areas of Earth. 
A: I will just add an answer to the already great existing ones. If you want to be more quantitative, you can show that for an ideal gas at constant temperature in a constant gravity field $\mathbf{g}$, the distribution of particules follow a Boltzmann law $n(z) = n_0 \exp (-mgz/kT)$, where $n(z)$ is the density at height $z$, $n_0$ the density at $z=0$, $m$ is the mass of a gas molecule, $k$ the Boltzmann constant and $T$ the temperature in Kelvins.
You can rewrite this as $n(z) = n_0 \exp (-z/H)$ with $H = kT/mg$ being a characteristic length of density variation. For air, at $300$ K, I think $H = 8$ km, meaning that the density is divided by $2$ over $H \log (2) \approx 5.5$ km. For gases such as dioxygen or carbon dioxide, the characteristic length is also on that order of magnitude. In particular, it means that density variations over a few meters are completely negligible (to first order, it gives a relative variation of $L/H$, where $L = 1$ m, so about 0.01%).
This was for a single gas. If you want to consider two gases, say $1$ and $2$, with molecular masses $m_1$ and $m_2$, I am not sure exactly how to modify the equations. One possibility would be to calculate the equilibrium distribution of $1$ alone as shown above, then consider the "modified" gravity $g^* = g (1 - \rho_1(z)/ \rho_2(z))$ felt by $2$, with $\rho$ the density. You would then find the density distribution of $2$ due to the presence of $1$. I guess you can then reinject the density you just found for $2$ into the equation for $1$ and keep going and hope for convergence.
I would guess that in the end, you would indeed find a slightly higher density of oxygen at the top of the tank, but only by a very small amount, on the order of the 0.01% found before. You can add interactions between particles on top (non-ideal gases), but I don't know if this would make a lot of difference.
If you add a temperature gradient on top, this would effectively be like having a position-depending characteristric length $H$. As you have seen, $H$ is directly proportional to the temperature in K, so even going from $300$ K to $150$ K (~$25$C to $-125$C !), $H$ would only go from $8$ km to $4$ km, but the relative variations will remain very small.
The main idea is that at ambient temperature ($300$ K), atoms have a lot of kinetic energy (mean velocity of about $500$ m/s, corresponding to a height of roughly $H = 8$ km), so they are completely unaffected by a change of a few meters in height.
A: 
If I have "air" in a closed box, does oxygen and carbon dioxide get
  separated over time? Does oxygen fill upper part of box and carbon
  dioxide lower part of box?

No, not unless the box dimensions become very large (like the height of the atmosphere of the earth), otherwise the difference in density between the top and bottom due to gravity would be extremely small. The velocities of the molecules, on the other hand, are very high so that they rapidly move around the dimensions of the container resulting in mixing. 
I should think another reason has to do with entropy. All natural (spontaneous) processes are in the direction of increasing entropy. Mixing of the gases increases entropy (increases disorder). Un mixing would decrease entropy (decreases disorder). So the natural process would be for the gases to mix. This, of course, does not necessarily apply to heavy gases or liquids (i.e., high density fluids) where separation can occur.

How about if upper part of box is warmer (~90C) than lower part of box
  (~50C)?

Again, the high velocities of the gas molecules would be such that the difference in temperature between the upper and lower box should rapidly diminish resulting in mixing of the gas, not un mixing. 
Hope this helps.
A: Consider two molecules A and B.
System I
The molecules are ideal gases with no volume, no interactions, and elastic collisions.
Case 1
Put the box in a location away from any gravitation field or temperature gradient. The system has no sense of "up" or "down", and it has no sense of "hot" and "cold".
Subject to a constant energy constraint, the maximum entropy state is one where the two molecules are perfectly intermixed.
Case 2
Put the box in a gravitational field. The molecules in the system now recognize an "up" and "down" direction based on their mass. The effect is to change the energy distribution of the positions of the molecules in the box. The heavier molecule will be in a lower potential energy state when it is closer to the bottom of the box. The extent of the redistribution in composition will depend on the strength of the gravitational field (e.g. putting the box on the moon versus the earth versus Jupiter) and the differences in masses of the two molecules.
On earth, the effect may not be entirely measurable in reality because nothing in reality is a perfect ideal gas (other interactions come into play) and because the uncertainties (precision) of measuring distributions that may be predicted to occur may overwhelm the magnitude of the differences that are predicted. By example, when the difference in distribution between top and bottom is a factor of 100x smaller than the precision of any measuring device that we have on hand, we will not see the difference.
Case 3
Put the box in a temperature gradient (but keep it in zero gravity). The molecules will now have a sense of an internal energy distribution between the hot and cold regions.
Since the particles are ideal gases, the internal energy is only affected by temperature and both particles are affected equally. The box has no unique energy distribution for A versus B. Therefore, the distributions of particles between hot and cold do not change. The molecules do not segregate based on temperature.
System II
The molecules are not ideal gases. They have volume and interact due to secondary bonds.
This introduces chemical potential as a factor in the considerations. A simple chemistry statement is "like dissolves like".
In zero gravity, the particles may still separate into two immiscible phases based on the degree that they "like" each other.
All previous considerations for putting the box in gravity apply.
Temperature can now drive a separation as well. The particles are no longer ideal. Their internal energy depends on temperature and pressure, and each particle may end in a different internal energy state depending on the temperature even at the same pressure. This will affect their chemical potentials and cause an energy distribution difference. So, the particles may segregate differently in the hot versus cold regions.
A: At any given temperature, the molecules of a gas have a range of different energies.  The range depends on the mass of the molecules.
The energy of a molecule is a combination of its kinetic energy and its gravitational potential energy.  The range of energies of the molecules in a gas (at least at room temperature) is great enough that the change in gravitational potential energy due to lifting a molecule from the bottom of a reasonably-sized container to the top is negligible compared to the average kinetic energy of the gas molecules.  That is a major reason why a gas will fill the container rather than settle to the bottom. On the other hand, the density of the gas will be very slightly greater at the bottom than at the top.  The density gradient will be very small, but will depend on the strength of gravity, the pressure, the temperature, and the mass of the gas molecules.
The range of energies for O2 and CO2 at a given temperature is different, but the ranges are wide enough that they overlap substantially. To first order, you can assume that the density gradients of CO2 and O2 in a mixture of the two will be the same as the density gradients of CO2 and O2 components considered separately.  That means there will indeed be a very, very slight change in the mix ratio from the bottom to the top of the container, if the gas is all at a constant temperature.
If a temperature difference is imposed on the gas at the top and bottom of the container, the situation is more complicated.  For one thing, this can only be done by continually adding heat in some places and removing heat at other places. But if that complication is set aside, the situation is similar to the constant-temperature situation: whatever density distribution would result for O2 alone at the partial pressure of O2 in the mix would, to first order, be the density distribution of the O2 component in the mix with both components.  Same, of course, for the CO2 component.
