The US ruling class violently opposed socialism from the moment it appeared:
But there was substantial public support for socialism across the country until after WWII, when it was dispersed and/or driven underground by the second red scare.
The key blow against organised US socialism was probably the Taft-Hartley act; that destroyed the last of the radical unions.