Near-perfect transverse magneto-optical Kerr effect (TMOKE), which is realized by sandwiching a magnetic-optical film between a photonic crystal (PhC) structure and a metallic mirror, is studied. Near-unity amplitude in TMOKE is observed owing to the excitation of Tamm plasmon polaritons (TPPs) at the interface between the PhC and the metallic mirror. The physical origin behind such giant enhancement of TMOKE is disclosed by studying the magnetic field distributions at resonance and also confirmed by the reflection spectra of the top PhC and the bottom continuous metallic film. Besides, the suitability and the sensitivity of the proposed structure for sensing both gas and aqueous mediums are also illustrated in the last. And it is found that the excellent performance with the averaged figure of merit (FoM) on the order of <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$4.8\times10^{3}$ </tex-math></inline-formula> and <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$6.7\times10^{3}$ </tex-math></inline-formula> can be achieved for sensing gas and aqueous mediums, respectively. We hoped that this work will prompt the development of data magnetic storage, optical filters, waveguide isolators, and novel sensors with improved sensitivity.