I'm covering roughly 1750-1970 in one post. Please excuse the simplifications.
There are a number of factors that I'll bullet point in a roughly chronological fashion and attempt briefly explain after:
First, you have to remember that Japan was never closed. They were trading with the Dutch and neighboring states the whole time. In the 18th and early 19th centuries, Japan was running out of the silver that they had been trading to the Chinese for luxury products like silk. This was wreaking havoc on the Tokugawa economy, so the shogunate further restricted trade and people pursued a strategy of import substitution. To avoid taxes and also to secure labor, workshops sprouted up in the outlying regions of castle towns, leading to a sort of industrious revolution, some of which would later come in handy for an industrial revolution.
When the American Commodore Perry Came into Edo (Tokyo) bay in 1853 demanding that Japan open up relations with the US and provide coal for US whaling ships (oh, the irony), the Japanese political structure was already under considerable strain because of the way that the rigid structure had impoverished many samurai while enriching merchants. These discontented samurai would prove critical in overthrowing the Tokugawa regime in 1868, and the upheaval of revolution also created the opportunity for wholesale change in social structure. Compare this to Qing China before the Opium Wars, which had been relatively stable and had decent social mobility; they had little reason to want to adopt new systems. Also in comparison to the Qing, Japan's small size made enforcing sweeping changes after the Meiji restoration an easier task.
Even before Commodore Perry showed up, Japan had heard reports of Qing China (the local equivalent of a superpower) being soundly defeated by the British in the Opium war. With that powerful example, the factions interested in learning from the west and turning western industrialization and military technology in their favor was able to defeat the factions that supported rejection of all things Western. Compare again to Qing which had to suffer a major political, economic, and military setback to learn the might of Western industrialization and military technology. Along the same lines, Western powers had little interest in Japan aside from using it as a waypoint, so Japan did not have to expend resources actively fighting off Western Imperialism.
Also keep in mind that at this time, Japan is not particularly "late" to the industrialization game; The only "early" industrializer was England. We tend to think of "The West" as industrializing well before "The East," but Japan's industrialization was only about 10-20 years "behind" Germany, 20-30 years "behind" France, and 30-40 years "behind" the US. Those years "behind" could easily be shortened in the presence of existing blueprints for industrialization. In this context, the Leaders of the Meiji State undertook a vigorous attempt to learn Western political systems and adopt Western technology. They sent study missions abroad and invited experts to Japan, supporting strong state intervention in the economy under the dual slogans of "rich country, strong military" and "civilization and enlightenment." The government managed to secure some popular backing for these massive changes by promising public discourse and deliberative councils from the very beginning, although in reality popular representation didn't materialize until 1890, and even then it was limited to the rich (universal male suffrage in 1925). That is not to say there wasn't resistance though, with conscription proving particularly controversial.
Japan mobilized the whole of the country's labor force by employing young girls and women in light industry, especially silk (you can ignore /u/smalltomatoespress attribution of this trend to the pleasure quarters; although they existed, the proportion of women employed as geisha prostitutes was not nearly enough to make a significant contribution to an industrialized labor force). Generally, young girls from impoverished families were sold into contracts with textile mills, and they would then work off their debt at wages that were lower than global standards, but accepaible to the girls because food and lodging was better than what they were used to. Government and industrial leaders then financed the expansion of coal mining and heavy industry on the profits from this light industry. It is also worth noting that Japanese industry was constructed along the lines of vertically integrated industrial combines called zaibatsu, which were able to eliminate waste through their control of all the entire supply chain. The zaibatsu were amenable to working with the government.
As early as 1876, only 8 years after the Meiji restoration, and less than 20 years after signing their own unequal treaty with the US, Japan imposed the unequal Treaty of Kanghwa on Korea, after an episode of gunboat diplomacy called the Un'yo incident. This opened up new markets for Japanese goods, and enabled Japanese Industry to benefit from cheap Korean raw materials, much in the way that other imperialist powers financed their industrialization by taking advantage militarily weaker powers. Korean rice also enable Japan to dedicate more labor to industry instead of agriculture. Imperialism helps the metropole industrialize while also undercutting the ability of the colony to do the same. This is an important point in global history, as many areas that became particularly late industrializers (China again is a key example in Asia) had their own attempts at reform undermined by indemnities to imperialist nations, and economic competition that could easily undercut native industry when unequal treaties denied them tariff autonomy. From this point on, Japan continued its economic expansion into Korea, coupled with enhanced political influence after the Sino-Japanese (1894-95) and Russo-Japanese (1904-05) wars. Japan eventually annexed Korea in 1910.
All of these trends continued until Japan got a major industrial boost in WWI. They sided with the allies and were able to take over German Colonial holdings in Micronesia and the Shandong peninsula, expanding both its colonial sources of raw materials and captive markets for Japanese goods, as well as its sphere of influence in China. Almost as important, the fact that Japan was not directly involved in the Fighting allowed Japanese industrial products to take the place of European goods on the world market, allowing it to generate a trade surplus for the first time, and allowing it to become a major world power in the process.
Learning that economic security was as important as military security in situations of total war from Germany's example in WWI, Japan sought economic self-sufficiency in the 1920s and 30s. This resulted in further Japanese expansion and the creation of the Manchukuo puppet state. International pressure to maintain an "open door" in China caused Japan, which viewed securing Asian territories as a source of raw materials as a matter of national survival, to depart from the League of Nations and pursue its agenda unilaterally. The pressure of the global depression of the 1930s forged an alliance between economic reformers and military expansionists in Japanese government, who passed laws in favor of strict central control of industry and massive production of war materiel. The continued expansion in the name of economic independence, brought more conflict and eventually a US oil embargo. Japan struck the US (Pearl harbor) and took European colonial holdings in the Pacific and South-East Asia in an attempt to secure the oil and rubber they needed for industrial independence.
A lot of Japan's industrial capacity was destroyed in WWII, but the basic know-how and skilled workforce were still there. Although the US occupation originally tried to destroy the zaibatsu and purge the rightists from both government and industry, the looming threat of communism caused the US to abandon its plans of democratization and demilitarization in favor of restoring the Capitalist elements of Japanese society, regardless of their imperialist pedigrees. These developments helped Japan avoid loosing the industrial gains that they had made under mobilization for total war.
The Korean War was the key to recovery. As a matter of convenience and of shoring up the Japanese capitalist economy, the US ran its special war procurements through Japan, giving heavy industry a major injection of funds and demand. Following this recovery, Japan pursued an strategy of export led development under the guidance of the Ministry of International Trade and Industry (MITI), which guided the former zaibatsu, restructured as horizontally integrated keiretsu, in avoiding competition with each other and maximizing economic growth overall.
Finally, influenced by the wartime production councils, unions assumed a collaborative stance towards their companies. After several bouts of large scale labor unrest between the late 1940s and the final large outburst in 1960, enterprise based unions (as opposed to industry based unions) managed to secure promises of lifetime employment and seniority based promotions in exchange for assuming a cooperative stance rather than an oppositional one. This meant that as long as the company did well, and you kept working there, you would get raises and promotions. These structures are largely responsible for the company loyalty and dedication that Japan became famous for during the period of high economic growth.
Rapid Japanese economic expansion experienced some hiccups with the Nixon shocks of the 1970s. The most economically important was the decision to turn the dollar into a fiat currency, freeing the artificially low yen from its relationship to the dollar that had kept Japanese goods cheap on the international market. Nonetheless, economic expansion continued through the 1980s until the bubble burst in 1990 or so. Japanese referred to the 1990s as the lost decade, but the 2000s haven't been all that much better in terms of growth. Nonetheless, despite the continually sluggish economy, standards of living have remained high. Economists frequently make gloomy predictions for the future, based on the aging of the population and national debt, but I'm a historian - I won't comment on that.
I think that there are several assumptions being made, I'd like to address them first.
First off, while Japan in the early part of the 20th century was not as industrialized as the UK or US, it was by no means stuck in time like it had been. There was a huge, absolutely HUGE mania for westernization (this died down during the war years, for obvious reasons) from about 1890 - mid 1930s. This manifested as a desire for 'western style' goods, a desire that ultimately trickled down to the lower classes. When this demand became great enough, domestic production of western goods ramped up. Their method for doing this was to simply import and reverse engineer both goods and processes (A good example would be the start of the Janome Sewing Company). However, these goods were considered inferior (generally, not always.) If you go to an antique store, look at the bakelite products (usually dressing table sets, small decorative items, etc) and you'll notice that many of the cheaper ones are stamped 'Nippon' -- that's Japan. Secondly, despite US firebombings and ultimate nuclear bombing of Japan, we didn't annihilate their industrial capacity. That seems to be a common misconception, but they were not back in the stone age. They were wounded, but not dead the way propaganda likes to portray it. Finally, Japan still had a large rural population as late as the 1970s because their terrain was considered difficult to mechanize.
There isn't a standard benchmark to say when industrialization begins -- obviously a water-driven mill is an industrial improvement over hand-grinding, but no one would say the 1600s were industrialized. Putting the benchmark at 'electric generation' would invalidate all of the industrialization that was happening in the early 1800s when water was used to power more complex machines. So it's difficult to put a date on when industrialization starts and when industrialization has saturated the system. But let's say that compared to the US and UK, Japan did industrialize fairly quickly. (I personally think that they industrialized faster than us, but slower than some others.)
Well then, why? The speed of industrialization is limited primarily by capital, available labor, raw materials, skills and infrastructure. It's also limited by precedent. That is to say, if no one has built a business like the one you plan to build, it's much harder. But Japan started off by importing entire blueprints for factories and job concepts. The government was dead set in the 1890s on appearing modern and civilized to the western world. Because their industrialization didn't require them to do the research and development, they shaved years off the time needed to industrialize.
Japan actually was a very poor nation, however, as much as Japan wanted western goods, the western world wanted Kimono, and they were willing to pay a great deal of money for these exotic robes. They were also willing to pay richly for Japanense entertainments. The chief difference, however, was that while very few Japanese could afford western goods, booming industry in the US and Europe meant that middle-class families could afford japanese goods. This created a trade imbalance and suddenly, Japan had a lot of capital in which to invest in their new factories.
The model for industrialization they had imported required very few highly skilled workers, mostly low-skilled or semi-skilled workers that were only experts in their one task. So skills were not a limiting factor in industrialization.
However, workforce should have been because in Japan's culture of the time, men stayed at home and did what their father did. Girls were sent out to their husbands or the pleasure quarters. There was not a large, available male workforce like there was in other nations. However, at the time, Japan was trying to close the pleasure quarters (and from time to time, the geisha districts -- the pleasure quarters would be officially dead in 1954.) The girls there tended to be low or no skilled, except for a very select few that had well, bedroom skills. While there was little shame in being a prostitue, it was considered a noble sacrifice for the family. One thing that Japan had done in an attempt to clean up red-light districts was create small schools to teach prostitutes and geisha the kinds of skills used in cloth manufacture and clothing manufacture. Factory jobs were considered more modern and better than selling a girl to the redlight district. Farmers still had large families. As a result of these policies and realities, Japan had a huge factory-ready force of women, who were considered ideal for detailed work due to attitudes at the time.
So, Japan had a workforce, the necessary capital, the necessary skills, and a business model that was tried and true. And of course, they were already accustomed to importing raw materials so that presented only a small problem. All of these factored into their ability to build an effective industrial base.