Magnesium diboride, MgB2, has the highest transition temperature (T(c) = 39 K) of the known metallic superconductors. Whether the anomalously high T(c) can be described within the conventional BCS (Bardeen-Cooper-Schrieffer) framework has been debated. The key to understanding superconductivity lies with the 'superconducting energy gap' associated with the formation of the superconducting pairs. Recently, the existence of two kinds of superconducting gaps in MgB2 has been suggested by several experiments; this is in contrast to both conventional and high-T(c) superconductors. A clear demonstration of two gaps has not yet been made because the previous experiments lacked the ability to resolve the momentum of the superconducting electrons. Here we report direct experimental evidence for the two-band superconductivity in MgB2, by separately observing the superconducting gaps of the sigma and pi bands (as well as a surface band). The gaps have distinctly different sizes, which unambiguously establishes MgB2 as a two-gap superconductor.