The popularization of other Chinese dishes in Japan dates further back than that of gyoza, however. The influx of Westerners into Yokohama, Nagasaki and Kobe during the 1860s set the stage for the diffusion of Chinese cuisine in modern Japan. Although the Chinese had no legal right to remain in Japan before the first Sino-Japanese treaty was concluded in 1871, they were brought in under the legal protection of Western powers. Western merchants relied heavily on their Chinese staff — servants, clerks and middle-men — to run the households and enterprises that they relocated from the China coast. During the 1870s and 80s independent Chinese merchants began to settle in Japan as well, so that the Chinese soon constituted the majority of the foreign population residing in the ports.
That is from Modern Japanese Cuisine: Food, Power and National Identity, by Katazyna J. Cwiertka. One thing I learned from this book was how much Japanese wartime experience created the notion of a national cuisine in Japan. Before the war, for instance, soy sauce and rice were not common foods in many parts of rural Japan.