Herein, the structural stability and gas sensing characteristics of the two dimensional (2D) ternary GaNP nanosheet with pentagonal structure were studied using density functional theory (DFT) technique. According to advanced theoretical calculations, the buckled ternary penta-GaNP nanosheet with a direct band of 3.48 eV is found to be stable. The phonon dispersion analysis demonstrated the stability of the nanosheet. The ternary penta-GaNP nanosheet has a symmetric distribution in the spin-down and spin-up total density of states (TDOS) and is non-magnetic in nature. Different gases, including NO, NH3, NO2, CO, CH4, SO2, CO2, SO3, C2N2, H2S, COF2, SOF2, COCl2, CS2, COS molecules were considered to investigate the adsorption energy, adsorption distance, net charge transfer, and band gap energy. It was found that SO3, NH3, COCl2, and H2S molecules chemisorb while other gas molecules physisorb on the nanosheet. In addition, NH3, CO, CO2, COS, CH4, COF2, and H2S gases decreased the work function while other studied gases caused an increase in the work function. Accordingly, the proposed ternary penta-GaNP nanosheet can provide sensitive and selective gas detection with a short recovery time.