GRAVITY pulls dust and gas in interstellar clouds together, but because the electrostatic force over short distances is so much stronger than gravity, even a small electrostatic repulsion between dust grains can influence (and possibly prevent) a cloud's collapse.
When the oxygen atoms of different water molecules come together, they repel. When the hydrogen atoms of different water molecules come together, they repel.