They were never a serious threat to the U.S. (particularly by the 1950s), however they were a perceived threat.
In the U.S., the social reforms of Teddy Roosevelt and Woodrow Wilson (with a few that showed up under Taft), undercut most of the really serious movements (Marxism, various kinds of Socialism, Anarchy, and a few others) by blunting the worst abuses of 19th century Capitalism. We went through a “Red Scare” at the end of WWII (following the Bolshevik victory in Russia), but the general prosperity of the 1920s did not make fertile ground for those movements.
When the Depression hit, most of those groups got a boost in publicity and membership. People looked for answers outside the cultural norms and these anti-government, anti-Capital groups provided them. A lot of people who could not find work and a lot of college kids in normal youthful exploration, associated with these groups, identified with these groups, and even joined these groups.
On the other hand, Franklin Roosevelt’s activities did much to minimize the view of the government as “enemy.” At the same time, a fear that an association with “revolutionary” groups caused the labor movement, desperate for legitimacy and fearing Justice Department intervention, to shun them. (The Reuther brothers who got the UAW going had visited Lenin’s Russia and were constantly under suspicion as reds.)
Such groups, particularly the American Communist Party, were a natural place for Soviet agents to attempt to recruit people and they did. The recruiting efforts were not very successful generally, but there were a few individuals recruited who did later make it into high government positions.
In time, as the U.S. slowly pulled itself out of the Depression, most members came to see the groups as ineffectual debating clubs and drifted away. With the onset of WWII, most of the groups simply collapsed as people went off to get war jobs or join the military.
Following WWII, the Soviet Union established a number of puppet states in Eastern Europe as a buffer against any future aggression. Simultaneously, indigenous Socialist and Communist parties used the poverty and chaos following WWII to make strong bids for power in France, Italy, Greece, Yugoslavia, and other countries further removed from the Soviet Union. At the same time, Mao was able to push himself into the void created by the defeat of the Japanese and begin establishing his Marxist group as the dominant power in China. A number of independence movements sprang into the open in former colonies around the world. Since Germany had been stripped of most of its colonies in 1918, it was the Western Democracies who were left as the colonial powers. The insurgents could not get aid from the U.S. to get free from Britain or France or Belgium, so they turned to the Soviet Union.
Seen from the perspective of the U.S. (using one set of perceptions), it really did seem as though the Marxist Revolution was threatening to engulf the world.
Of course, that meant that such noble persons as Joe McCarthy and Richard Nixon could garner votes if they could just find the right “red” to expose. McCarthy got into the Senate on his war record and, when he did not advance fast enough, decided to speed things up with a little witch hunting.
As noted above, the Soviets had successfully recruited agents from the left-wing political groups. (Not nearly enough to warrant McCarthy’s witch hunt, but enough to get it going.)
Of course, nearly everyone who had gotten a college degree in the 1930s had been exposed to some left wing organization and a great many had joined. Far fewer stayed active, but McCarthy portrayed the “commies” as so stealthy and wicked and smart, that anyone who had ever talked to a communist had probably been corrupted. The entertainment industry has always had a good share of left-leaning individuals, so they were ripe for examination. (After all, they were producing the radio shows and movies that were subtly perverting the nation’s youth to turn them against good American values.)
For the record. I’m pretty sure that McCarthy stuck to attacking people in government, beginning with his claim that the State Department had 200+ “infiltrators.” Despite being unable to produce a single name, he used the publicity to grab a committe chairmanship and spent nearly four years wrecking careers of civil servants for no more reason than a desire for publicity.
I believe that the Hollywood investigations were carried out by the House Unamerican Activity Committee.