BARCELONA, Spain — With its soaring but impossibly slender columns and masonry that resembles heavy frosting, Antonio Gaudí’s unfinished masterwork La Sagrada Familia seems as if it might suddenly collapse on itself, like a surreal cake.

But the architect in charge of efforts to complete the church, one of the most visited monuments in Spain, says the building is indeed threatened — by a train tunnel that, if built as planned, would be dug within a few feet of its foundations. “The project could cause irreparable damage to the Sagrada Familia,” said the architect, Jordi Bonet, 81, who leads a group of 20 architects. “The slightest shift could cause ceramics to fall from the vaults. It could provoke cracks.”

“What would possess someone to build a tunnel like this next to the heaviest building in Barcelona, the most visited monument in Spain?” he asked.

In a workshop below the building, he paused next to a plaster model of the unbuilt facade and whipped out a tape measure to show how the tunnel, for a high-speed rail line, and a protective outer wall would pass about five feet from the church’s foundations. Mr. Bonet said the huge, delicately balanced structure was especially vulnerable to a major construction project.