He said he's more focused on MS-13 because it is "particularly violent," speaking at inside the Van Nostrand Auditorium on the Brentwood campus of Suffolk County Community College.
"We will find you, we will arrest you, we will jail you, and we will deport you," he said.
The president urged Congress to find money to pay for 10,000 Immigration and Customs Enforcement officers "so that we can eliminate MS-13."
Trump said the administration is removing these gang members from the United States "but we'd like to get them out a lot faster and when you see...these thugs being thrown into the back of the paddy wagon, you just see them thrown in rough, I said, 'Please don't be too nice.'"
Trump then spoke dismissively of the practice by which arresting officers shield the heads of handcuffed suspects as they are placed in police cars.
"I said, 'You could take the hand away, OK,'" he said, drawing cheers from the audience.
Trump also claimed that laws are written to "protect the criminal" and "not the officers," telling law enforcement officials that the "laws are stacked against you" and need to be changed.
Protesters also turned out for Trump's visit, including members from at least 30 different Long Island groups who say the president is only using the MS-13 threat to push forward his anti-immigrant agenda.
"When they criminalize these kids, and tell them, 'you have no place here,'" youth advocate Sergio Argueta said. "The only place these individuals have to turn to is gangs."
Hundreds of protesters lined the road outside Suffolk County Community College, advocating for immigrants and other groups, including the LGBT community.
"We are involved in a battle for the very soul of this nation, and that defines who we are as Americans," said Assemblyman Phil Ramos, a Democrat from Brentwood. "Trump wants to use our tragedies as an excuse to start immigration raids in our community." He said the Republican president was "throwing meat to a red base."
The Suffolk County deaths began to get attention after best friends Nisa Mickens, 15, and Kayla Cuevas, 16, both students at Brentwood High School, were beaten and hacked to death in September by a carload of gang members who spotted them walking down the street. Investigators said Cuevas had been feuding verbally with gang members.
In April, three teenagers and a 20-year-old man were massacred in a park in Central Islip. Prosecutors said they were lured to the park and then ambushed by at least a dozen MS-13 members wielding machetes and other weapons. One person escaped. Prosecutors said they were marked for death because some were suspected of being rival gang members - something their families denied.
Twenty people have been charged publicly in eight homicides in recent months. They include five people accused in the deaths of Mickens and Cuevas and 10 people in the Central Islip massacre. All but a few of those charged in the deaths were citizens of El Salvador or Honduras who entered the U.S. illegally, according to law enforcement officials.
(The Associated Press contributed to this report.)