WASHINGTON—Senate GOP leaders gave up their effort to dismantle and simultaneously replace much of the Affordable Care Act, after the defections of two more Republican senators left the party short of the votes needed to pass President Donald Trump’s top legislative priority of his first seven months in office.

In a stinging defection for party leadership, GOP Sens. Mike Lee of Utah and Jerry Moran of Kansas on Monday night became the third and fourth Republicans to oppose the latest version of the GOP bill, which would roll...