There have been some theoretical studies on the high pressure phase transition behavior of BaF2, while in most cases the authors pay main attention to the optical and electrical properties of BaF2 with increasing pressure. To date, there is still a lack of theoretical explanation for the hysteresis phenomenon of high-pressure phase of BaF2 when the pressure was released. In addition, the pressure-dependent behavior of the BaF2 band gap is still controversial, and there are few studies dealing with its high-pressure Raman spectra. Therefore, first principles were used to make a supplementary calculation of the high pressure behavior of BaF2. For a given pressure P and temperature T, the thermodynamic stable phase has the lowest Gibbs free energy. The calculations are performed at zero temperature and hence, the Gibbs free energy becomes equal to the enthalpy. Thus, the variation of enthalpy was calculated as a function of pressure to study the high-pressure phase stability of BaF2 based on density functional theory as implemented in the Vienna ab initio simulation package (VASP). The results show that BaF2 undergoes two structural phase transitions from Fm3m(cubic) to Pnma(orthorhombic) and then to P63/mmc(hexagonal) with increasing pressure, and the transition pressures are 3.5 and 18.3 GPa, respectively. By calculating the evolution of lattice constant with the pressure, it was found that at about 15 GPa (near the second phase transition pressure), the lattice constants of the Pnma structure show abnormal behavior (a slight increase in bo and a slight decrease in ao). We suggest that this behavior leads to the reduction of the band gap by analyzing the calculated results of Pnma structure of other materials. The Pnma structure completely transformed to P63/mmc structure at about 20 GPa. By analyzing the phonon dispersion curves of BaF2 as a function of pressure, the structural stability information of the material can also be obtained. Then the density functional perturbation theory (DFPT) was used to calculate the phonon dispersion curves of BaF2 by VASP code and Phonopy code. The hysteresis phenomenon of the P63/mmc structure, when the pressure was released, is explained by phonon soft mode. The results predict that the P63/mmc structure can be stabilized at least to 80 GPa.