His comments came as the British government said it would present draft legislation within days to begin the process of withdrawing from the EU, seven months after Britons voted for exiting the bloc in a referendum.
"Brexit is a serious threat," Rajoy told a Madrid gathering organised by conservative daily ABC.
"Without wanting to go into other considerations, I will only tell you that one in five tourists who come to Spain are British, and close to 17 million Britons visited Spain last year."
The Brexit-related fall of the value of the pound in recent months has caused concern that fewer Britons may travel, and has British retirees in Spain worried about their declining purchasing power.
Officially, over 300,000 Britons reside in Spain, but many do not bother to register, with estimates suggesting between 800,000 to a million live in the country.
"I will also tell you that the United Kingdom is the first destination for Spanish companies' investment and our third commercial partner," Rajoy said.
He added that post-Brexit, serious thought needed to be given to improving the EU so that it was "more cohesive, more effective in its decision-making and with better political ambition."
As such, he said the results of elections in France and Germany later this year - where far-right, eurosceptic parties are on the rise - would be "decisive".
"Spain... hopes that its two biggest partners will maintain their pro-EU vocation and their determination to push forward a project which despite all its imperfections is the best political initiative the world has seen in
centuries - the EU project."