Good question: at room temperature hydrogen and oxygen are gas, yet water is liquid. The two hydrogen atoms are rather tiny and light compared to one atom of oxygen, so it is indeed surprising that adding so little to oxygen - which is gas - produces a liquid. Consider that oxygen comes in pairs of two atoms linked - in fact a molecule of oxygen is heavier than a molecule of water !
Im afraid I do not have an answer for this, but I am curious to find out myself