The five-pagoda gateway was built in 1768 during the Qing Dynasty along the axis of the temple right behind the front gate and the tablet pavilion on the way to the main hall. According to Buddhist scripture, Buddhist monks and devotees should pass through the gateway at least twice a day to show their respect for and devotion to Buddha. Architecturally, a pagoda gateway is more ornamental than functional.
The gateway, with three arched doors and five pagodas on top, was erected on a terrace. It was built of bricks painted gray; the five pagodas were made of glazed bricks in bright colors.