While making some maps on Inkarnate for a new Japanese-themed Ravenloft-domain I published on DMS Guild, I was reminded how these kind of Japanese gates often show up in unusual places in Western media, including fantasy media:

But these gates aren’t just for decoration, they’re an important part of Japanese Shinto religion, called a torii (鳥居). They’re a feature only found at Shinto shrines, not Buddhist temples. Similar structures exist in other Asian cultures, but the torii in particular serves a religious function.
Shinto is a religion devoted to the kami, the native divinities of Japan, and in Shinto tradition ritual purity is important. The kami will not descend to ritually unclean places, nor hear the prayers of unclean people, so sacred places must be purified. A sacred space in this context can be as small as a tiny home shrine, a kamidana, or as large as the sanctum of a large shrine such as Meiji Shrine in Tokyo.

What matters is that there’s a sense of “boundary” between the mundane, outer world and the sacred, inner realm.
The torii thus acts as a gate between these two worlds. By passing through the gate you enter the sacred grounds of the shrine, or leave it. It’s also why taking away things from a shrine like pebbles or flowers is frowned upon.
Torii can be very small, or using the example of Meiji shrine, extremely large. There are many styles too. Some are bright red, others a more natural color. Sometimes a shrine will have a series of torii gates.

In the photo above, these gates were sponsored through donations by local businesses. As with many other aspects of Shinto, there’s a lot of local community involvement as well as give and take.
Anyhow, that’s a brief look at torii gates.