The history of Buddhism in Japan starts when Buddhism was introduced about 1450 years ago during the Nara period. We can say that it has a very long history. It all began, according to Chinese records when a monk delegation from China left for Fusang which might be Japan.
The first years were not actually easy as Buddhism became one more tool in the struggle for power over the imperial dynasty by the Soga clan over the rival Mononobe and Nakatoni clans.
The story goes that Emperor Kinmei, not sure what to do with these gifts, consulted with his advisors. The advisers were divided in two camps:
Soga no Iname said that Japan should adopt Buddhism as it was the religion all the powerful and civilized countries had and Japan, striving to be powerful should imitate them (sounds like a Meiji rethoric).
The other clan consisted of Mononobe no Okoshi and Nakatomi no Kamako. They rejected Buddhism saying that if they adopted it, the local dieties would undoubtely be angered.
The Sogas seized to opportunity to promote Buddhism and other "Western ideas" (from China and Korea) like Confucianism and other governmental and cultural models from China. For them it was a way to civilize Japan and give power to the emperor.
The rival clans opposed the Buddhism as a foreign invasion and when an epidemic started after the importation of a statue, they claimed the local Kami were not in agreement with the new religion. They threw the idol in the river and burned the temple to the ground. (That statue was retrieved and now is in Zenkoji, Nagano.)
A 50-year long war insuded where temples were burned and the power-struggle finally moved in the favor of the Soga Clan. Buddhism finally began to take hold. They way it happened is refered as an accident. When a second statue was imported and enshrined in a temple, another epidemic started in Japan. Seeing this, the opponents destroyed the temple and the image once more. This time, though, the epidemic did not subside but increased in virulence.
This was seen as divine punishement for cracking down on Buddhism and The Soga's were then given permission to embrace Buddhism privately.
Yomei became emperor in 585 but became sick the very next year. Wishing to recover his health, he decrlared his devotion to Buddhism at the suggestion of the Soga clan. This marks the point where Buddhism became official in Japan.
It was a very aristocratic religion though and only the elite practiced it at first as only them had access to the texts.
During this period some famous figure emerged like En-no-Gyoja, a "folk priest" combining Buddhism, Shamanism and Taoism. He started a religion called Shugendo which is still practiced today all over Japan.
Some great temples were erected during the Nara period. Such famous temples as Todai-ji -home of the Great Buddha- and Hokki-ji are still famous today and are among the most visited in Japan.
The Kamakura period (1185-1333) corresponds to a long shogunate by the Minamoto clan. During this period, Buddhism took another ideological turn with the introduction of schools of Buddhism for the masses like the Pure Land schools and philosophical schools like Zen which were adopted more by the elite Samurai class.
The Muromachi period (1333-1573) is when the Minamoto lost power and the emperor was restored for a brief period of time (3 years only!) and the following Shogunate by the Ashikaga clan. This clan was not as strong as the previous Minamoto clan so this period is on of social rife and civil war.
This period saw the rise of martial idealism and Zen was closely linked to the samurai class. The Rinzai school of Zen accomplished considerable development during this period.
During the years following the Meiji restoration, Shinto was made the official state religion in an effort to justify the emperor as the direct descendant of the sun goddess Amaterasu. This resulted in a slow but sure decline of the hold Buddhism had in Japan. After the second World War, when the United States forced the separation of state and religion, schools stopped teaching about religion and it became a family tradition to teach the rites to the younger generation.
Nowadays, young people have very little interest in Buddhism and traditions are lost. According to some sources, some 100 temples are closing every year around the country, mostly small, family run temples or poor temples, deserted by the followers.