This story is a version of the Ogre of Rashomon as the story is named in Yei Theodora Ozaki's Japanese Fairy Tales. I however refer to the titular creature as a demon based on the Japanese word "oni" which is demon/devil.
Rashomon is a gate that once stood in Kyoto that lapsed into disrepair and became a place of ill repute. According to legend a demon took up residence there and snatched up passer-bys. Eventually it bit off more than it could chew when it tried to grab a samurai.
The photos were taken by me of the temple gate of Zojo-ji Temple in Tokyo, a shot of a float from the Nebuta festival of Aomori showing a samurai fighting a demon (Raiko and Shuten-doji), and a depiction of the story on a float at the Neputa Festival in Hirosaki, Aomori Prefecture. The other images are 19th Century woodblock (ukiyoe) prints.