Spain's made the complaint came after the British government summoned the Spanish ambassador to London on Wednesday to explain the "incursion" by Spanish vessels.
Ambassador Federico Trillo was hauled in to explain why a Spanish state research vessel and its police escort entered the waters off the tiny British peninsula on Tuesday, the Foreign Office said in a statement.
Spain responded by handing an official protest to Britain's ambassador in Madrid, accusing the Royal Navy of harassing the vessel.
It comes barely four months after Trillo was summoned to discuss a day-long standoff also involving a Spanish research vessel, which defied repeated Royal Navy orders to leave Gibraltarian waters.
"I am extremely concerned to hear of another incursion into British Gibraltar territorial waters on April 1st by a Spanish state research vessel, which sought to undertake survey activity," said Britain's Europe minister, David Lidington.
"Not only were the actions of the survey vessel unlawful, but it was accompanied by a Spanish Guardia Civil vessel whose dangerous manoeuvring presented a significant safety concern on the waters."
He added: "I strongly condemn this provocative incursion and urge the Spanish government to ensure that it is not repeated."
A Spanish diplomat denied that the waters in which the incident occurred were British.
"We have summoned the British ambassador to hand him a letter of protest at the actions of the British boats, which tried to obstruct the environmental research and protection work of the Spanish oceanographic boat," he told news agency AFP.
Footage of the incident in which officers of Spain's Civil Guard can be seen telling a British Royal Naval vessel to cede priority.
"The Spanish oceanographic boat… was harassed by four boats of the Royal Navy and two of the Royal Gibraltar Police. Later the seaborne Guardia Civil came to the aid of the Spanish boat."
A widely distributed video of the event shows vessels of Spain's Civil Guard and the British Royal Navy refusing to cede passage to each other.
A Civil Guard agent on the vessel tells the Royal Navy "This is a Spanish boat and I am here because I feel like it. You're going to have an accident.
"This is a Spanish boat and I'm staying here," says the agent before again telling the British Navy vessel to make way.
This is the fourth time that Britain has publicly summoned Spain's ambassador over Gibraltar since Prime Minister Mariano Rajoy took office in December 2011.
Spain ceded Gibraltar to Britain in perpetuity in 1713 but has long argued that it should be returned to Spanish sovereignty, and the territory remains a source of diplomatic tensions.
Relations between London and Madrid became particularly strained last year after Gibraltar dropped 70 concrete blocks into the sea in July, in what its government said was an attempt to create an artificial reef.
The move had the effect of also blocking Spanish fishing boats from operating close to the airport runway, and Madrid responded by introducing stringent border checks.
On November 19th, the Foreign Office summoned the ambassador to explain an incursion by the oceanographic survey ship Ramon Margalef, which it said came within 250 metres (270 yards) of the entrance to Gibraltar harbour.
Barely a week later, Britain made a formal protest to Spain after its officials opened British diplomatic bags at the border with Gibraltar. Prime Minister David Cameron accepted Madrid's explanation that a junior official was to blame.