There is an intense ongoing debate on the role of the state in the wake of globalization: is it still relevant or has it relegated its controlling position to transnational organizations?
Globalization refers, in simple terms, to a greater (and more liberal) flow of goods, services, workforce, capital, ideas and information across national borders. This has been facilitated by technological innovations, reduced communication costs, opening of markets for investment and trade, increasing entrepreneurship (especially in the developing world), and global networking. This has led to some (rather drastic) changes in how states function. States have traditionally been the main driving force behind the development of the framework for economic & social activities, social welfare, internal & external security, implementation of law, etc. In the wake of globalization, many of these responsibilities are being redefined.
The role of the state, in my opinion, is not diminishing but transforming from "a service provider" to a "regulator". First of all, remember that not all countries are signatory to open market policies and even among the ones who have opened their markets, certain aspects are still controlled by the government to protect the interests of their own citizens. Developed countries are still protecting some areas of their market/economy from foreign players by imposing heavy import duties. It is the state that decides whether it wants to open its market to transnational organizations and how much access has to be given.
The more socialistic states, the best examples being India and China (not only because they are the largest markets ~ 2.5 billion people, but also because they are the fastest growing economies as well), have recently (relatively) opened their markets. These states have been the prime provider of services, including telecommunications, energy, etc. However, with globalization, the state is pulling back from this role of "provider" and moving to being a "strategic manager" of the market players who are now the providers.
States also control the welfare of their own citizens. This is even more relevant in the globalized world, since the influx or efflux of the workforce is taking place across border, and the EU and US have imposed stricter immigration norms to control it. More importantly, recent spates of anti-trust law suits (especially against Microsoft) has shown the relevance of the state in protecting its interests.
Thus, it is not the retreat of the state that we are witnessing but rather a transformation, with a more global outlook.