In this manuscript, the electronic structure, bonding nature and optical properties of the ternary Ba2HgS5 compound was investigated using the density functional theory (DFT). The generalised gradient approximation (GGA), Engel and Vosko generalised gradient approximation (EV-GGA) and the modified Becke Johnson (mBJ) schemes were used to model the exchange and correlation potentials. Band structure calculations indicate that this compound has a direct energy band gap value of 2.34 eV, showing a close agreement with the experimental band gap value of 2.40 eV. The energy band gap value calculated using the mBJ formalism is larger than those obtained from the GGA and the EV-GGA approaches. From the analysis of the partial electronic energy density of states, it was observed that the valence band is dominated by the Ba-p, S-s and Hg-d electronic states, while the conduction band is formed by the S-p and Ba-d orbitals. In addition, there exists a strong hybridisation in the valance band and in the conduction band between the S-p and Hg-s, Ba-s and Hg-f, Hg-s, S-p as well as the S-p and Hg-p states, respectively. This strong hybridisation leads to strong covalent bonding between the Hg-S and Ba-S atoms. Moreover, the optical constants were calculated and discussed in details. The energy dependent optical parameters were found to be anisotropic with respect to the polarisation of the incident electromagnetic wave and exhibit features in complete agreement with the electronic band structure calculations. The compound absorbs ultraviolet radiation quite strongly. Ba2HgS5 possesses high refractive index over a wide range of frequency and has potential to be used as anti-reflective coating and also in photonic devices like in light emitting diodes (LEDs).