Parc Güel is one of Barcelona's tourism hotspots with four million visitors a year. Photo: Jason Saul
This makes tourism one of the few sectors that have continued to grow and create jobs in the crisis-ridden country.
Spain is the country among the top ten that sees the biggest improvement since 2011: moving up four places since the last assessment, it is now ranked 4th.
The country continues to lead in cultural resources, ranking first this year in this area because of its numerous World Heritage sites (second) , its large number of international fairs and exhibitions (third) and its significant sports stadium capacity.
Its tourism infrastructure is another strength, with its many hotel rooms, car rental facilities, and ATMs.
Furthermore, its air transport infrastructure is highly developed and ranks among the top ten worldwide.
The World Bank has pointed out that starting a business has become less costly and onerous and that hotel prices have come down a bit, both likely reasons for Spain's rise in the rankings.
Rajoy's government has kept tourism high in its development agenda, making Spain a top ten economy for prioritization of the industry.
Spain has also notably maintained its efforts on marketing activity and spending on the industry’s development amid difficult economic circumstances.
"The tourism industry is extremely important for Spain and traditionally a great source of work for young people. Its success could be a viable solution to the country's unemployment problem", WEF director for tourism and aviation Thea Chiesa told Spanish news agency Efe.
In a biennial, 140-country ranking of competitiveness in the world's travel and tourism trade, the WEF said the Swiss had retained the top slot held in all five previous editions.
Overall, Europe remained the world's most competitive region, with Germany, Austria, Spain and Britain coming hard on Switzerland's heels.
The rest of the WEF's top 10 was made up by the United States, France, Canada, Sweden and Singapore.
The WEF noted that the travel and tourism industry had managed to remain relatively resilient despite the gloomy global economic picture.
"The sector has benefitted from the continuing globalization process: travel has been increasing in mature markets and, particularly,
has been driven by the rising purchasing power of the growing middle class in many developing economies," it said.
Seven out of ten Europeans travelled in 2012 (the same proportion as in 2011).
And of EU holiday makers, as many as 88% spent their vacations somewhere within the EU, either in their own country or in another Member State.