The tea leaves first arrived in Japan during the Nara period when there was so much influence from China. That is also the time when Buddhism was introduced from China and the social system was copied from the Tang Dynasty in China. In those times the tea was used mostly as a medicine and only available to the rulers and the noble families.
In 1187, Eisai, who was a priest, traveled to China and brought the tea seeds with him. He promoted the idea of grinding tea leaves which was different from how the tea was consumed in China. He said that green tea can cure many diseases including paralysis, loss of appetite and waterborne diseases. He also recommended drinking tea to not to fall asleep after a long time of praying and chanting in buddhist temples. Eisai is the founder of the Rinzai sect of Zen Buddhism who popularized the sect in Japan. So the tea ceremony and the Zen have always been associated.
With the rise the samurai class who adopted the zen buddhism during the Muromachi period (1336~1600: this is the period when there were so many wars in Japan and Japan consisted of dozens of small states) the green tea became more and more common in Japan. Uji emerged as the most prominent tea growing town where the most delicious tea grew in in Japan. The samurai used to gather and drink green tea as a leisure activity and also play the game of correctly guessing the different types of teas grown in Japan. The culture of drinking from the same bowl is said to have been born during this period as there used to be a large number of samurai gathering in the same house with the limited number of bowls.
Most people agree that the tea ceremony as it is today was founded by Sen no Rikyu (1522 ~ 1591) who lived in the Sakai City part of the Osaka district. He is said to have built over 40 chashitsu (teahouse) and is also the grandfather of the founders of the three main tea schools that exist in Japan. He took the idea of the leisure tea drinking activity into a more ritualistic way tea drinking with the omotenashii spirit (subjugation of self for the guest) and the wabi-sabi philosophy (simplistic and minimalistic approach to life). Most of the tea ceremony elements such as alcove, the tea garden, small low-ceiling tearoom, scroll on the wall, seasonal flower decoration known as chabana and the four main principles of the tea ceremony were introduced by Sen no Rikyu. Unfortunately he was sentenced to death was Hideyoshi Toyotomi, then ruler of Japan, who himself was known as a tea fan.
During the Edo Period (1600~1868) the popularity of tea grew. Every year, 30 guarded horsemen used to carry the 8 baskets of the freshest tea from Uji Kyoto to to Tokyo that could only be drunk by the Shogun the emperor and a few nobles. The tea caddy was considered as one of the most important 3 things a samurai possessed (the other two were the katana and the scrolls). It was mostly the samurai class who knew and performed tea ceremony as an important protocol of meetings and receptions. The simplicity was kept but more decorations on the bowls and the tea room emerged.
Before the Meiji only the samurai, religious monks, the royals and few elites used to enjoy the tea ceremony. During the Meiji period (1868 ~ 1912), the government recognized the tea ceremony as an important cultural heritage. As the samurai system was abolished ordinary people and women also started enjoying the tea ceremony. The geisha must have learned the tea ceremony as part of their training and the young women were supposed to study it along with ikebana to be eligible for marriage.
Today, most Japanese would have the experience of the tea ceremony practice at least once perhaps at the elementary school or high school. A number of universities and high schools have the tea ceremony student clubs actively participated by students. In the 1950s and 60s it was common for the marriage age women to go to special schools and learn tea ceremony, ikebana , etc to be ready for marriage and learn how to serve their husbands. In Japan elementary school students are taught the basics of tea ceremony to learn the consideration of others and turn taking. The biggest tea ceremony school Urasenke has hundreds of branches all inside and outside Japan. The elderly enjoy tea ceremony courses occasionally offered community centers.
Unlike what most foreigners think, tea ceremony is usually NOT held in teahouses. Generally speaking, people who are interested in tea ceremony go to a tea ceremony school or join a tea ceremony circle and do it periodically. Most tea ceremonies are held at tearooms in zen temples and there is usually no such thing like “today I want to drink tea, then, I will go to a teahouse and do a tea ceremony.”