The environment ministry said in a statement it "has issued a favourable environment impact statement".
It said the exploration would take place around 60 kilometres (40 miles) from the shores of the archipelago and stressed its decision was backed by "rigorous" scientific research.
A spokesman for the Spanish oil giant said "the favourable statement showed that the planned activity is compatible with the protection of the environment".
A broad coalition of environmental and conservationist organisations condemned the government decision and warned it could jeopardize the archipelago's vital tourism revenue.
"This is an unjustifiable act which poses a serious threat to the environment and to the islands' main economic activity," a joint statement said.
The statement said seismic surveys could affect marine species and also risk causing major oil spills.
Of all the advanced economies of the OECD grouping, Spain is the most reliant on energy imports, buying in 99.9 percent of its oil and gas.
The current conservative government is hoping to reduce this dependence by developing oil and gas production, a sector that a March study showed could create a quarter of a million jobs over the next two decades.
The news of the government's decision comes two months after the tiny Canary Island of El Hierro announced plans to become the first in the world fully powered by renewable energy later this year by launching a new wind and water energy plant.
It also comes in the wake of intense criticism of the Spanish government's attitude to green and solar energy, including a controversial 'sun tax', or levy on consumers who produce energy for their homes using solar panels.