Water molecules are polar. This means that one end of the molecule is slightly negatively charged (the oxygen atom) and one end of the molecule is slightly positively charges (the hydrogen atoms). The slightly positively charged hydrogen atoms in one water molecule are attracted to the slightly negatively charged oxygen atom in a neighbouring water molecule. A hydrogen bond forms between these attracted atoms, 'sticking' the water molecules to one another. In plants, water moves from the roots, up the stem through vessels called xylem and into the leaves. You are right that this goes against gravity, so how can the water move upwards? Well, plants loose water through their leaves through a process called transpiration. When these water molecules leave the plant, they pull the water molecules below them up through the xylem as they are 'stuck together' by hydrogen bonds in a chain. You could imagine this to be like beads on a string necklace. This property of water molecules to 'stick together' by hydrogen bonds is called cohesion. As transpiration continues, more water molecules leave the plant and therefore they pull more water molecules up through the stem and to the leaves in a relatively continuous movement.