Gibraltar has accused Spain of manipulating the European Council for its own political interests.
A draft document on the EU's Brexit strategy said no agreement on the EU's future relationship with the UK would apply to Gibraltar without the consent of Spain, giving it a potential veto.
But Gibraltar's chief minister Fabian Picardo said this was "unacceptable".
Conservative MPs in the UK have warned that the sovereignty of the UK overseas territory is non-negotiable.
MP Jack Lopresti said Spain was using Brexit as "a fig leaf for trouble making", while fellow Tory Bob Neill tweeted "no sell out".
Foreign Secretary Boris Johnson spoke to Mr Picardo as the UK government attempted to reassure Gibraltar and said: "As ever, the UK remains implacable and rock-like in our support for Gibraltar."
An EU source told the BBC the inclusion of the Gibraltar issue in the document had come after lobbying from Spain.
Spain has long contested Britain's 300 year-rule of Gibraltar.
Gibraltarians, who number about 30,000, rejected by 99% to 1% the idea of the UK sharing sovereignty with Spain, in a vote in 2002.
However, Spain has continued to press its territorial claim.
Following last June's EU referendum - in which Gibraltar voted by 96% to 4% to remain in the EU - Spain's then foreign minister suggested shared sovereignty could allow Gibraltarians to maintain some of the benefits of EU membership and enable Spain to "plant its flag" there.
But Alfonso Dastis, his successor, said in January that Spain would not put Gibraltar at the centre of the negotiations and it would be free to leave the EU if it wished.
Gibraltar: key facts
- Gibraltarians are British citizens but they run their own affairs under a chief minister
- The territory is self-governing in all matters - including taxation - except foreign policy and defence, which are dealt with by the UK government
- Despite its small size, Gibraltar is strategically important, standing only 12 miles from the north coast of Africa. It has a UK military base, including a port and airstrip
In its draft Brexit negotiating guidelines, the European Council identified future arrangements for Gibraltar as one of its 26 core principles.
It wrote: "After the UK leaves the union, no agreement between the EU and the UK may apply to the territory of Gibraltar without agreement between Spain and the UK."
Brussels officials were quoted by the Guardian as saying the EU was standing up for its members interests.
"That means Spain now," a senior EU official told the newspaper.
"Any extension of the deal [after withdrawal] to Gibraltar... will require the support of Spain. [The text] recognises that there are two parties to this dispute."
But Mr Picardo said: "This draft suggests that Spain is trying to get away with mortgaging the future relationship between the EU and Gibraltar to its usual obsession with our homeland.
"This is a disgraceful attempt by Spain to manipulate the European Council for its own, narrow, political interests.
"Brexit is already complicated enough without Spain trying to complicate it further."
Mr Lopresti, chairman of the UK's All-Party Parliamentary Group on Gibraltar, said there was no question of any negotiation over Gibraltar's future.
He will raise the matter with the secretary general of Nato, of which the UK and Spain are both members.
He said: "It is shameful that the EU have attempted to allow Spain an effective veto over the future of British sovereign territory, flying in the face of the will of the people of Gibraltar."
Mr Neill, chairman of the Commons Justice Select Committee, which examines relations between the UK and its overseas territories, tweeted: "Gibraltar's friends in the UK will be watching this very carefully. There will be no sell-out."
Labour MP Mary Creagh, a supporter of the Open Britain campaign group, said Gibraltarians risked being treated as "pawns" in the Brexit process.
"The Rock depends on free movement of labour from Spain, and on its place in the single market to support its vital services industries," she said.
"'Brextremists' should be ashamed that their actions have destabilised the situation in Gibraltar."
Lord Boswell, chairman of the House of Lords EU Committee, said it was "unfortunate" that the prime minister's Article 50 letter made no mention of Gibraltar and said this meant "the door has been opened for the EU to present it as a disputed territory".
"The reality is that any agreement on the future UK-EU relationship is likely to require the unanimous agreement of all 27 remaining member states, including Spain, as well as the UK," he said.
Gibraltar's government has ruled out any dilution of sovereignty in return for continued access to the European single market or other benefits attached to EU membership.
Key issues in post-Brexit negotiations relating to Gibraltar are likely to be border controls - thousands of workers commute in and out of the territory from the Spanish mainland every day - and airport landing rights.