The trimeric spike (S) glycoprotein, which protrudes from the SARS-CoV-2 viral envelope, is responsible for binding to human ACE2 receptors. The binding process is initiated when the receptor binding domain (RBD) of at least one protomer switches from a "down" (closed) to an "up" (open) state. Here, we used molecular dynamics simulations and two-dimensional replica exchange umbrella sampling calculations to investigate the transition between the two S-protein conformations with and without glycosylation. We show that the glycosylated spike has a higher barrier to opening than the non-glycosylated one with comparable populations of the down and up states. In contrast, we observed that the up conformation is favored without glycans. Analysis of the S-protein opening pathway reveals that glycans at N165 and N122 interfere with hydrogen bonds between the RBD and the N-terminal domain in the up state. We also identify roles for glycans at N165 and N343 in stabilizing the down and up states. Finally we estimate how epitope exposure for several known antibodies changes along the opening path. We find that the epitope of the BD-368-2 antibody remains exposed irrespective of the S-protein conformation, explaining the high efficacy of this antibody.