The mass of $^{27}$P was predicted to impact the X-ray burst (XRB) model predictions of burst light curves and the composition of the burst ashes. To address the uncertainties and inconsistencies in the reported $^{27}$P masses in literature, a wealth of information has been extracted from the $beta$-decay spectroscopy of the drip-line nucleus $^{27}$S. We determine the most precise mass excess of $^{27}$P to date to be $-659(9)$~keV, which is 63~keV (2.3$sigma$) higher than the AME2016 recommended value of $-722(26)$~keV. The experimentally unknown mass excess of $^{27}$S was estimated to be 17030(400)~keV in AME2016, and we constrain this mass to be 17678(77)~keV based on the measured $beta$-delayed two-proton energy. In the temperature region of $(0.06-0.3)$~GK, the $^{26}$Si$(p,gamma)^{27}$P reaction rate determined in this work is significantly lower than the rate recommended in the reaction rate libraries, up to two orders of magnitude around 0.1~GK. The impact of these newly determined masses and well-constrained rate on the modeling of the explosive astrophysical scenarios has been explored by hydrodynamic nova and post-processing XRB models. No substantial change was found in the nova contribution to the synthesis of galactic $^{26}$Al or in the XRB energy generation rate, but we found that the calculated abundances of $^{26}$Al and $^{26}$Si at the last stage of XRB are increased by a factor of 2.4. We also conclude that $^{27}$S is not a significant waiting point in the rapid proton capture process.