The electronic structure and optical properties of BaGa4Se7 crystals were studied by generalized gradient approximation (GGA) and Heyd–Scuseria–Ernzerhof (HSE). The electronic structure results showed that BaGa4Se7 is a nonlinear optical crystal with a direct wide band gap. The band gap was calculated to be 2.36 eV using the HSE06 method, which is basically equal to the experimental value. The band structure showed that the top of the valence band was largely contributed by Ga 4s, 4p and Se 4p states, while the bottom of the conduction band was mainly comprised of Ga 4s, 4p, Se 4p, and Ba 5d states. The optical properties showed strong absorption and reflection in the ultraviolet region and strong transmittance in the infrared region. The average static refractive index of BaGa4Se7 was 2.73, and the static birefractive index was 0.04. These values indicate that the material has a good phase-matching ability and a wide laser damage threshold. The above results indicate that BaGa4Se7 is a potential infrared nonlinear optical crystal material.