Singapore came second and Sweden third.
The WEF published its findings from a survey the day after the Swiss central bank stunned financial markets by setting a minimum rate for the Swiss franc against the euro.
This was to hold down the Swiss currency against an inflow of funds seeking shelter from the eurozone debt crisis, and the franc plunged by about 10.0 percent..
This rush had pushed up the franc by about 20.0 percent, endangering the competitive position of exporting industries and tourism and raising a spectre of a sudden slowing of growth.
The WEF said: "Switzerland's scientific research institutions are among the worlds best, and the strong collaboration between its academic and business sectors, combined with high company spending on R&D, ensures that much of this research is translated into marketable products and processes."
Switzerland, hitherto relatively unscathed by the financial crisis, has low unemployment and debt levels.
The country of eight million people also benefits from effective public institutions, good public infrastructure and highly developed financial markets, the WEF said in its 2011-2012 Global Competitiveness report.
The United States ranked fifth, falling for the third year in a row.
"While many structural features that make its economy extremely productive, a number of escalating weaknesses have lowered the US ranking over the past two years," it said.
The United States has good universities, is strong in research and development and has a big economy and a flexible workforce, the WEF found.
But it said that "the business community continues to be critical toward public and private institutions.
"In particular, its trust in politicians is not strong, and it considers that the government spends its resources relatively wastefully," the WEF said.
However, "a lack of macroeconomic stability continues to be the United States greatest area of weakness," it said, adding that high levels of public indebtedness were likely to undermine the country's growth.
The study was based on publicly available data and a survey of 14,000 business leaders in 142 countries.