It is told that after Amaterasu-ōmikami, the Sun Goddess, hid herself inside the sacred cave, the world plunged into darkness. The other kami tried then to find a solution to convince Amaterasu to return to the world, so they brought in front of the cave some roosters and their crowing made Amaterasu get out to see what was happening.
After that, in front of the Shinto shrines, people started to build roosts for the birds - and in time, these roosts became the today's torii.
In Japanese, "tori" 「鳥」 means bird, and torii is written 「鳥居」, so torii can be interpreted, indeed, as a "roost for birds".
EXIF info:
Nikon D90
Lens: VR 70-300mm F/4.5-5.6G
Focal Length: 80mm
Aperture: F/7.1
Shutter Speed: 1/800s
ISO Sensitivity: ISO 200