The court said it would examine the case in full in October but said that the ban could be enforced immediately for travellers from the targeted countries "who lack any bona fide relationship with a person or entity in the United States."
The court tempered its ruling by saying the ban could not be implemented for now against people who have personal links to the United States, citing the examples of foreign nationals wishing to visit family or students accepted to attend a university.
But the Supreme Court's decision nonetheless marks a win for the Republican leader, who has insisted the ban is necessary for national security, despite criticism that it singles out Muslims in violation of the US constitution.
Trump had suffered a series of defeats in lower courts over the ban, with two federal appeals courts maintaining injunctions on it by arguing that his executive order discriminated against travelers based on their nationality.
But reacting to Monday's ruling, Trump said that he had now been vindicated by what he called "a clear victory for our national security."
"It allows the travel suspension for the six terror-prone countries and the refugee suspension to become largely effective," he said in a statement.
"As president, I cannot allow people into our country who want to do us harm."
But campaigners against the ban also welcomed the fact that the court had tempered the reach of the ban and the prospect of the case being heard in the fall.
Omar Jadwat, director of the American Civil Liberties Union's Immigrants' Rights Project who argued one of the appellate cases brought against the ban, said he hoped the court's decision would mark a step towards ending an "indefensible and discriminatory ban."
"The Supreme Court now has a chance to permanently strike it down," Jadwat said in a statement.
Trump's revised measure, announced in March, seeks to bar from US entry travelers from Iran, Libya, Somalia, Sudan, Syria and Yemen for 90 days, as well as suspend the entry of refugees for 120 days.
The original measure, issued by executive order in January and almost immediately blocked by the courts, also included Iraq on the list of targeted countries and had imposed an indefinite ban on Syrian refugees.
- Discrimination -
In an ruling earlier this month, the three justices of the Ninth Circuit Court of Appeals said that "immigration, even for the president, is not a one-person show."
The Supreme Court narrowed the scope of the injunctions on the ban, saying the government could enforce its measure against "foreign nationals unconnected to the United States" without causing injury to the parties who filed suit.
The legal woes associated with Trump's travel ban had left in limbo a key campaign promise by the Republican to crack down on immigration from Muslim countries.
The countries targeted were on a list drawn up by Barack Obama's government of countries whose authorities had very poor data on their own citizens, making it difficult to vet the identities of visa applicants.
Trump's administration says the ban is needed to prevent terror attacks in the country, and that it needs the time allowed by the ban to evaluate existing screening protocols and set new ones.
But courts ruled that because it applied selectively to mainly Muslim countries, the ban violated the US Constitution's ban on religious discrimination.
While the ban itself did not single out Muslims, the judges cited Trump's repeated statements during last year's presidential race that he intended to ban Muslims from entering the United States.
- 'Extreme vetting' -
After the initial legal setback for the ban, the White House slightly revised the order to try to address concerns raised in the courts, but the second measure also was shot down.
The Justice Department filed an emergency application to the Supreme Court on June 1, urging it to undo the two lower court rulings.
The White House argued that the US president has the power to set immigration policy, especially on national security grounds.
Even without the ban in place, arrivals from the six countries has dropped sharply, in part due to the "extreme vetting" approach of US authorities, toughening their scrutiny of visa applicants.
Arrivals from Iran, Libya, Somalia, Sudan, Syria and Yemen were down by nearly half in March and April from a year ago -- 6,372 for the two months compared to 12,100 in 2016, according to recent official data.