Vanadium dioxide is a prototype material for the discussion of correlation effects in solids. First-principles density-functional theory does not describe the metal-insulator transition, whereas strongly correlated models reproduce the main features. Here we present a parameter-free GW calculation of VO2 and show that the correlation effects in the band structure of both the metallic and the insulating phases are correctly reproduced, provided that quasiparticle energies and wave functions are calculated self-consistently. Our calculations explain the satellite in the photoemission spectrum of the metal as due to a plasmon resonance in the energy-loss function and show that this feature disappears in the insulator.