The idea of leaving Northern Ireland in the European customs union and mostly in the single market after Brexit has been kicked around for several years. Known as the “backstop,” the concept is that Northern Ireland could continue trading with Ireland, a member of the European Union, without tariffs, border checks or other impediments to the seamless flow of goods between them.

Mrs. May, in deference to her coalition partners and fearful that a border in the Irish Sea would be a first step to breaking up the United Kingdom, expanded the backstop to put all of Britain into the bloc’s customs union. The European Union, in its hunger to strike a deal with Britain, went along with that demand.

But the backstop was anathema to the hard-line Brexiteers like Mr. Johnson. They said it might delay Britain’s exit indefinitely and threatened to leave Europe without any deal if Brussels did not abandon it.

A no-deal Brexit would badly damage the Irish economy. By the British government’s own reckoning, a hard border could mean lost jobs, a flourishing black market, roadblocks and civil unrest as people dealt with sudden dislocations. Some predict a revival of the violence once known as the Troubles.

“We were meant to have solved all our problems,” said Monica McWilliams, an academic and former politician in Belfast who was involved in the Good Friday negotiations. “Then, bang, along comes Brexit, and the whole Northern Ireland issue is back on the table.”

Ireland understandably opposes any deal that does not include a backstop, and Europeans are signaling their solidarity. Phil Hogan, the former European agriculture commissioner who was recently appointed Europe’s top trade official, said he saw glimpses of flexibility in Mr. Johnson’s visit to Dublin.