An ordered phase showing remarkable electronic anisotropy in proximity to the superconducting phase is now a hot issue in the field of high-transition-temperature superconductivity. As in the case of copper oxides, superconductivity in iron arsenides competes or coexists with such an ordered phase. Undoped and underdoped iron arsenides have a magnetostructural ordered phase exhibiting stripe-like antiferromagnetic spin order accompanied by an orthorhombic lattice distortion; both the spin order and lattice distortion break the tetragonal symmetry of crystals of these compounds. In this ordered state, anisotropy of in-plane electrical resistivity is anomalous and difficult to attribute simply to the spin order and/or the lattice distortion. Here, we present the anisotropic optical spectra measured on detwinned BaFe2As2 crystals with light polarization parallel to the Fe planes. Pronounced anisotropy is observed in the spectra, persisting up to an unexpectedly high photon energy of about 2 eV. Such anisotropy arises from an anisotropic energy gap opening below and slightly above the onset of the order. Detailed analysis of the optical spectra reveals an unprecedented electronic state in the ordered phase.