Disclaimer: I am not a computational chemist, I am completely new to this stuff. Just a humble student of @pentavalentcarbon
However, my thought is that if you have interacting OH groups, the hydrogen bonding would make the eclipsed conformations more stable. Is this the case? Why or why not? For example, consider a small molecule containing two carbons, each with an alcohol group (or more attached).
I looked at two model compounds, ethane, and ethane-1,2-diol. Also, I did preliminary molecular mechanics-based geometry optimisations using the MMFF94s force field in Avogadro.
I performed a CCSD(T) calculation in psi4 using the aug-cc-pVDZ basis. For ethane, obviously, two conformers were identified:
$$\begin{array}{cc}
\hline
\text{conformer} & \text{Energy (in hartrees)} \\ \hline
\text{eclipsed} & -79.5971\\
\text{staggered} & -79.6027\\
\hline
\end{array}$$
The difference in single point energies between the staggered and eclipsed forms $\Delta E_{\text{staggered-eclipsed}} = -0.0056$ which means the staggered form is lower in energy by about $14.7\ \mathrm{kJ\ mol^{-1}}$ (or $3.5\ \mathrm{kcal\ mol^{-1}}) $
Now, for ethane-1,2-diol. A first preliminary calculation and random rotor search in Avogadro gave me three distinct conformers (although, two were very close in energy), however, every trial after that just produced two. They are given below:
$$\begin{array}{cc}
\hline
\text{conformer} & \text{Energy}\ (\mathrm{kJ\ mol^{-1} }) & \ce{OCCO}\ \text{bond angle} \\ \hline
\text{conformer 1} & 72.0914 & 59.0266\\
\text{conformer 2} & 85.534 & -179.967\\
\hline
\end{array}$$
I have attached some screenshots below:
Now, hydrogen bonding is not explicitly treated in this calculation, but based on my discussion with @pentavalentcarbon the Leonard-Jones term in the forcefield (and to a lesser extent the electrostatic term) does capture these interactions.
So clearly, some stabilisng influence is evident in the structure, because if I were to argue on sterics alone, conformer 2 should have had lower energy than conformer 1. As an additional test, I measured the distance between $\ce{H}5$ and $\ce{O}2$ and found it to be 2.62 Angstroms. This is indeed suggestive
Now, using the geometries of conformer 2 and conformer 1, and that of an additional conformer with completely eclipsed oxygens that I obtained from Avogadro, I performed another CCSD(T) calculation is psi4 (again in the aug-cc-pVDZ basis). The table given below summarises my results:
$$\begin{array}{cc}
\hline
\text{conformer} & \text{Energy (in hartrees)} \\ \hline
\text{conformer 1} & -229.744410904091524
\\
\text{conformer 2} & -229.740781143788695\\
\text{completely eclipsed} & -229.725483329882337
\\
\hline
\end{array}$$
Again, the difference in single point energies between conformer 1 and conformer 2, $\Delta E_{\text{1-2}} = -0.0036297603$, means that conformer 1 is more stable by about $9.5399\ \mathrm{kJ\ mol^{-1}}$ (or about $2.277\ \mathrm{kcal\ mol^{-1}})$
This is probably due to an intramolecular hydrogen bond, as suggested, which has an overall stabilising effect on the gauche form of ethylene glycol (conformer 1). This is thus one of the instances in which the anti conformation (conformer 2) is higher in energy relative to the gauche conformation.
Finally, the difference in single point energies between conformer 1 and the eclipsed conformer, $\Delta E_{\text{1-eclipsed}} = -0.0189275742$, this implies that conformer one is more stable by about $49.694\ \mathrm{kJ\ mol^{-1}}$ (or $11.877\ \mathrm{kcal\ mol^{-1}}$)
Thus, I would say the energy penalty of eclipsing is still much higher than any stabilisation that can be gained from hydrogen bonding in this conformation. Shifting the angle between the two $\ce{OH}$ groups by about 60 degrees relieves this eclipsing strain while still allowing for the formation of a hydrogen bond, and is by far the best compromise.
To be honest, I wanted to scan over several dihedrals, make a potential energy plot, and calculate an exact barrier to rotation but faced two hurdles: a) I couldn't write down the z-matrix properly, and couldn't write the appropriate loop in the program. b) the calculations that I did perform and have quoted here, took a while to run, and based on that, I am guessing what I had in mind would have been a little too ambitious for my poor, little laptop.
Addendum @Jan pointed out in the comments that the gauche effect is responsible for the stability of the gauche conformer, which to be fair, I did not think about at all because I was so focused on the "hydrogen bond", however, it is worth looking into. Here's a post that discusses it (answered by @Jan himself ;) )