We have performed ab initio electronic structure calculations to calculate the structural properties and high-pressure phase transition in Barium dihydride (BaH2). Our results show that BaH2 crystallizes the orthorhombic phase (CoSi2-type structure) with Pnma space group at ambient conditions. A phase transition to the hexagonal (Ni2In-type structure) with P6(3)/mmc space group is found at pressure around 4 GPa. At the phase transition, the coordination number of hydrogen increases from 9 to 11 and the average bond length of Ba-H increases. The results show a band gap of 2.9 eV for orthorhombic and 1.8 eV for hexagonal phase. In addition, it was also found that more energy is required to desorb hydrogen atom from high-pressure phase as compared to ambient phase.