ATLANTA — Three years ago, the Democratic Socialists of America had 5,000 members. Just another booth at the campus activities fair, another three-initialed group an uncle might mention over lunch.

Today, dues-paying D.S.A. members exceed 56,000. Representative Alexandria Ocasio-Cortez, a rising star of American politics, is one. So are a couple of dozen local elected officials across the country. Senator Bernie Sanders, a current presidential candidate, is not, but he may as well be: He identifies as a democratic socialist and enjoys a totemic status with the group’s members .

Mr. Sanders’s popularity during his unsuccessful 2016 run for the Democratic presidential nomination helped swell D.S.A.’s ranks. But a very different figure is primarily responsible for the group’s staggering growth: President Trump, who recently associated “radical socialism” with the “destruction of the American dream.” In fact, the majority of current D.S.A. members signed up in the last two years.

“Trump scared a lot of people,” said Maria Svart, the national director, in an interview. “So they joined.”