In this work, we design a novel refractive index sensor in the terahertz region. The proposed structure is (PSi1/PSi2)N/Sample/Gyroidal Graphene/substrate. PSi1 and PSi2 are porous silicon with porosity of 80% and 30%, respectively. This sensor based on the Tamm plasmon polariton at the porous silicon interface of photonic bandgap and gyroidal graphene. The appearance of Tamm plasmon polariton at the interface is because of the plasmonic behavior of gyroidal graphene and the controlled porosity of silicon layers. Porous silicon is used due to its refractive index controllable by the porosity, pore size, and sample material filling pores. Tamm plasmon polariton is highly sensitive to the change in the refractive index of the sample material in the order of air index. The effects of the different variables such as gyroidal graphene volume fraction, sample index, the thickness of the gyroidal graphene layer, and the number of periods are studied. The optimizations are performed to improve the performance of the sensor. The high sensitivity of 18.6 THz/RIU is achieved with better FoM 126,835 RIU−1 and Q-factor 26,300. The investigated sensor using gyroidal graphene records performance more than quadrupled comparing with the same structure with graphene sheets. This sensor can be useful in several fields such as gas sensing, environmental monitoring, and biosensing.