LONDON—The third terror attack in Britain in as many months laid bare a growing challenge to Europe’s police and intelligence agencies and prompted Prime Minister Theresa May to say tolerance of Islamist extremism in the country had gone too far.

The attack, which killed seven people and was claimed by Islamic State, interrupted the campaigning for national elections for a second time and shook confidence in the country’s counterterrorism strategy, which Mrs. May said would be reviewed.

“Since...