Dissociation of HCl in aqueous solution
Water is a polar species in which the oxygen atom in $\ce{H2O}$ has a partial negative charge and the two hydrogen atoms have partial positive charges. As you suggested, this is because oxygen is highly electronegative (i.e. it has a high affinity for electrons) and so the negative electrons tend to have a higher density around the oxygen atom than the hydrogen atoms, creating this separation of charges due to water's molecular structure. Take a look at the molecular structure of water, which can be shown below. It has an asymmetry bent geometry and therefore the charge distribution in water is also not symmetric. 

The hydrogen in $\ce{HCl}$ does not actually give its electron to the chlorine atom. Rather, the more electronegative chlorine ion is attracted to the partially positive hydrogen atoms in water, and the hydrogen ion in $\ce{HCl}$ is attracted to the partially negative oxygen atom in water. This separates the $\ce{H+}$ from the $\ce{Cl-}$ in $\ce{HCl}$ so that the acid dissociates into its respective ions. You therefore get the equation $\ce{HCl -&gt; H+ + Cl-}$ when in water. If you include water on the reactant side, it can be equivalently written as $\ce{HCl + H2O -&gt; H3O+ + Cl-}$. Here, $\ce{H3O+}$ is simply indicating that the $\ce{H+}$ ion is in an aqueous solution.