Haneda airport is one of the two major airports of Tokyo. The main transit to the airport is Keihin Kyuko Line (Keikyu) that departs from Shinagawa station in Tokyo.
I thought the train line was built for the airport, but, it was not. In fact, it was built for transporting visitors to a shrine at the location where Haneda airport is. The Anamori Inari Jinja was established around 1815 or so.
Anamori line was opened in 1902 (Meiji 35) between Kamata and Anamori. Haneda Airport’s construction was started in January 1930 and was open on August 25, 1931 (Showa 6). So, the train line was there well before the airport. Later in 1913, the train line was extended to Shin-Anamori, which was right in front of the shrine (see the image below) . Commercial air travel was probably not common either at that age. The area was well developed for a tourist destination (day trip) too by the train company. There was a horse racing track, and a beach. The area seems to be popular until the World War II started.
After the end of WW II in Septermber 1945, the occuping US army took over the Tokyo Airfield and surrounding neighborhood, and named as Haneda army air base. The US army demolished the area including the shrine and built an air base. (It looks like the island part beyond the bridge)
The train line was also shortened to Inari-bashi station.
The airport was returned to Japan in 1952.
The commercial airport terminal building was opened in 1955. Haneda Kukou (airport) station(羽田空港駅) was opened in 1956. However, the location was right before the river, and the passengers needed to walk or use bus to the airport terminal, but the access was not very good. At this time, majority of the passengers were taking Tokyo monorail.
Anamori line was renamed to airport line (空港線) in 1963.
After the expansion of Haneda airport, the train line was finally extended to below the new terminal. With the much improved access, this line becomes the most popular way to get to the airport from downtown Tokyo.