“Ōmisoka” is the Japanese term for the last day of the year. “Misoka” is the last day of the month, when the moon goes into hiding (because in the old Japanese calendar, months always started on the day of the new moon), and so Ōmisoka, or “Great Misoka” is the last day of the whole year. Within Shinto, I very occasionally see “misoka” used to refer to the last day of the month, but that word seems to no longer be used in normal Japanese society.
In Shinto traditions, Ōmisoka was when households welcomed Ōtoshigami, “Great Kami of the Year/Harvest”, who was both an agricultural kami and the collective ancestors of the household. The kadomatsu pine decorations set up outside doors were, it is said, originally vessels for the kami, while the shimëkazari rope decorations marked off sacred spaces, and the round kagami mochi rice cakes were offerings. People in many areas created a separate, temporary, kamidana for Ōtoshigami, and some rural areas preserve elaborate older traditions, even today. These days, however, the decorations are just decorations for most people.
While hatsumōdë, as the first jinja visit of the year, has to take place early in the new year, at present a lot of people head out for it on Ōmisoka. (This year, the pandemic is likely to reduce the numbers again.) Long lines form at jinja, which open the doors to the haiden at midnight so that people can do their hatsumōdë as early as possible. When there is no pandemic, there are tens of thousands of people doing this at Meiji Jingū, and even my local jinja gets a few thousand.
However, this is a surprisingly recent custom; the senior priest at my local jinja can remember when it didn’t happen there, and she isn’t that much older than I.
A little thought reveals why it is not ancient. Under the old calendar, New Year’s Day was always a new moon, which means that it would be very dark at night. Not a good time to visit the jinja. Indeed, there are a lot of customs associated with “Little New Year”, which is the first full moon of the year — when the night might be bright enough for matsuri.
The calendar changed in the 1870s, but midnight jinja visits only became popular with the spread of street lighting and all-night public transport. Thus, it seems to be largely a post-war custom, and it appears, as far as I can see, to have started with large jinja, and only spread to smaller ones later.
Now, of course, heading out to hatsumōdë is as much a part of Ōmisoka as watching Kōhaku Uta Gassen (Red-White Song Battle, a program on NHK — also a post-war creation), maybe even more so.