Los Gatos has closed a highway onramp now for two consecutive summers and it is perfectly legal
In California, you only need approval of Caltrans. In other states it is likely similar.
Many people think there is a "taxpayer" angle...there isn't. The governing body of the roads typically has blanket authority to close roads without public consent
In the end, Towns will reconfigure themselves to be giant cul de sacs.