Using angle-resolved photoemission spectroscopy, we report on the direct observation of the energy gap in 2H-NbSe2 caused by the charge-density waves (CDW). The gap opens in the regions of the momentum space connected by the CDW vectors, which implies a nesting mechanism of CDW formation. In remarkable analogy with the pseudogap in cuprates, the detected energy gap also exists in the normal state (T > T-0) where it breaks the Fermi surface into "arcs," it is nonmonotonic as a function of temperature with a local minimum at the CDW transition temperature (T-0), and it forestalls the superconducting gap by excluding the nested portions of the Fermi surface from participating in superconductivity.