The EU is demanding the UK ditches plans to change Boris Johnson's Brexit deal "by the end of the month" or risk jeopardising trade talks.
The UK has published a bill to rewrite parts of the withdrawal agreement it signed in January.
The EU said this had "seriously damaged trust" and it would not be "shy" of taking legal action against the UK.
But cabinet minister Michael Gove said the UK had made it "perfectly clear" it would not withdraw the bill.
The government says Parliament is sovereign and can pass laws which breach the UK's international treaty obligations.
EU chief negotiator Michel Barnier said "trust and confidence are and will be key", after the latest round of UK-EU trade talks wrapped up in London on Thursday.
His UK counterpart David Frost said "significant" differences remained over a free trade deal, but added discussions would continue in Brussels next week.
The source of the EU's concern is Mr Johnson's proposed Internal Market Bill, which was published on Wednesday.
It addresses the Northern Ireland Protocol - an element of the withdrawal agreement designed to prevent a hard border returning to the island of Ireland.
The bill proposes no new checks on goods moving from Northern Ireland to Great Britain. It gives UK ministers powers to modify or "disapply" rules relating to the movement of goods that will come into force from 1 January, if the UK and EU are unable to strike a trade deal.
The publication of the bill prompted emergency talks between Cabinet Office minister Michael Gove and Maros Šefčovič, the European Commission Vice-President.
After two sets of meetings today - one on the trade talks and the other on the government's plans to rewrite part of the agreed treaty from last year - there has been nothing less than a diplomatic explosion.
The EU issued a statement that was about as furious as any I've ever seen in this kind of context - demanding that the UK government withdraw the controversial plans to override the deal done with the EU last year by the end of the month, and threatening to take legal action if it doesn't happen.
Essentially saying that there's no chance of trade talks, and hence no chance of a deal, unless the UK backs down.
At this stage, however, anyone with more than a passing acquaintance with this government would know that's inconceivable.
It is not, of course, impossible that further down the track the government may give way, or concede in quite a big way.
But right now, the chances of a move are slim to none.
Following the discussions, the EU issued a strongly-worded statement warning that the withdrawal agreement was a legal obligation, adding that "neither the EU nor the UK can unilaterally change, clarify, amend, interpret, disregard or disapply the agreement".
The EU rejected the UK's arguments that the bill is designed to protect peace in Northern Ireland arguing that "it does the opposite".
Mr Šefčovič said that if the bill were to be adopted, it would constitute an "extremely serious violation" of the withdrawal agreement and of international law.
He urged the government to withdraw the bill "by the end of the month", adding that the withdrawal agreement "contains a number of mechanisms and legal remedies to address violations of the legal obligations contained in the text - which the European Union will not be shy in using".
Germany's UK ambassador said he had not experienced "such a fast, intentional and profound deterioration of a negotiation" in his diplomatic career.
"If you believe in partnership between the UK and the EU like I do then don't accept it," he tweeted.
In its response, the UK government said it would "discharge its treaty obligations in good faith", but added that "in the difficult and highly exceptional circumstances in which we find ourselves, it is important to remember the fundamental principle of parliamentary sovereignty".
"Parliament is sovereign as a matter of domestic law and can pass legislation which is in breach of the UK's treaty obligations. Parliament would not be acting unconstitutionally in enacting such legislation.
"Treaty obligations only become binding to the extent that they are enshrined in domestic legislation. Whether to enact or repeal legislation, and the content of that legislation, is for Parliament and Parliament alone."
Mr Gove "said that, during the talks, he had "made it perfectly clear that we would not be withdrawing this legislation", adding that the government was "absolutely serious".
The Internal Market Bill will be formally debated by MPs in Parliament for the first time on Monday, 14 September.
It has come under increasing criticism from Conservative parliamentarians.
Former party leader Lord Howard said it would damage the UK's "reputation for probity and respect for the rule of law", while former Chancellor Lord Lamont asked ministers to "think again".
But Mr Gove said: "I'm looking forward to the second reading of the bill next week. It's an opportunity for the government to set out in detail why we have this legislation."
He promised to fight for "unfettered access for goods from Northern Ireland to the rest of the United Kingdom".
Mr Johnson has defended the bill, saying it would "ensure the integrity of the UK internal market" and hand power to Scotland and Wales, while protecting the Northern Ireland peace process.
But critics say the move will damage the UK's international reputation after a minister admitted the plans break international law.
Labour leader Sir Keir Starmer urged the government to consider "the reputational risk that it's taking in the proposed way forward".
Meanwhile, the latest round of formal talks over a post-Brexit trade deal concluded in London on Thursday.
Speaking afterwards, Mr Barnier said the EU had "shown flexibility" in an effort to "find solutions", but the UK had not "not engaged" on some "major issues".
For the UK side, Lord Frost said "challenging areas remain and the divergences on some are still significant".
He said the UK negotiators "remain committed" to reaching a deal by the middle of October and officials would "continue discussions" next week.