U.S. home sales slumped in June as home prices for major West Coast cities declined for the first time since 2012, ending the spring selling season with a thud.

Real-estate agents said lower asking prices could eventually attract more buyers, but home values in the Bay Area, Los Angeles and Seattle have roughly doubled over the past seven years. That means prices may have to retreat further before buyers do more than look, economists said.

“Prices...