California accused one of its own cities of blocking the construction of enough affordable places to live, filing a lawsuit Friday that signals an aggressive approach to the state’s housing crisis by the new governor, Gavin Newsom.

Huntington Beach, an upscale coastal city outside Los Angeles, is “standing in the way of affordable housing production and refusing to meet regional housing needs,” according to an announcement from the office of Mr. Newsom, a Democrat elected in November.

...