Europe Minister David Lidington said the activities of the Spanish state research ship and its accompanying Guardia Civil vessel had not only been "unlawful" but were also dangerous.
He told ambassador Federico Trillo that the UK Government would take "whatever action we consider necessary" to uphold British sovereignty and protect Gibraltar.
The latest incident is understood to have occurred when the research ship Angeles Alvarino accom-panied by a Guardia Civil vessel entered British territorial waters around 7.30pm on Tuesday.
They were immediately shadowed by ships from the Royal Navy's Gibraltar squadron and the Royal Gibraltar Police.
In the course of what was described by Mr Lidington as "dangerous manoeuvring" by the Guardia Civil vessel, there was said to have been a minor collision with a police boat.
Senior British officials in London contacted officials in Madrid about the incident and around 9.30pm the Spanish boats left British territorial waters.
Mr Lidington condemned what he described as a "provocative incursion" by the Spanish.
"Not only were the actions of the survey vessel unlaw-ful, but it was accompanied by a Spanish Guardia Civil vessel whose dangerous manoeuvring presented a significant safety concern on the waters," he said.
"Her Majesty's Govern-ment takes a grave view of any attempt by Spain to exert authority or control within British Gibraltar territorial waters and consid-ers such incursions as a violation of our sovereignty."
The summoning of Mr Trillo marks the fourth time the Spanish ambassador has been publicly called in to the Foreign Office in relation to Gibraltar since the current government in Madrid took office in December 2011.