Apple has claimed that Samsung infringed its design patent and copied the look of its popular device, the iPad.
The Samsung tablet is considered by most analysts as the biggest rival to Apple’s iPad.
The ban does not apply to the Galaxy Tab 10.1 II, the tablet’s new edition.
The (Free-Pr-Online.com) trial for the case is scheduled to begin in California on 30 July.
Apple will have to post a $2.6m (£1.67m) bond to enforce the injunction, which it applied for in May, to compensate Samsung if the ban subsequently proves to have been unnecessary.
“Although Samsung has a right to compete, it does not have a right to compete unfairly, by flooding the market with infringing products,” said US District Judge Lucy Koh.
The judge had previously denied Apple’s appeal for an injunction on the Galaxy tablet and smartphones, but was asked by a federal appeals court to reconsider Apple’s request on the tablet PC.
In December 2011, a German court threw out Apple’s complaints about Samsung’s redesigned Galaxy 10.1N.
In an emailed statement to the BBC, Samsung said that it “will take necessary legal steps” and that the ruling was unlikely to have a significant impact on its business.
Apple has been filing suits against various manufacturers who use the Google Android operating system in their tablets and smartphones.
Motorola, HTC and Samsung have all seen their patents challenged in the courts.
Apple and Samsung are involved in a variety of legal cases in various countries across the globe amid claims and counter claims of patent infringement.
While Apple had accused Samsung of “blatant copying” of its design and look, the South Korean firm has alleged that Apple infringed its patents relating to the way phones and tablet PCs connect to the internet.
Analysts said the order passed by the judge was a significant development in the continuing legal battle between the two companies.
“The relief being given to Apple here is extraordinary,” said Colleen Chien, a professor at Santa Clara Law in Silicon Valley.
“Preliminary injunctions are rarely asked for and rarely granted.”
Apple and Samsung are two of the biggest manufacturers of tablet PCs and smartphones in the world.
Sales of the iPad more than doubled to 15.43m for the three months to 31 December 2011.
And in the first quarter of 2012 it sold 13.6m, giving it about 63% of the global tablet market, according to research firm Display Search.
Samsung sold 1.6m tablets over the same period, giving it a 7.5% share.
The success of Apple’s iPhone and iPad has seen the firm recently become the world’s most valuable company.
Meanwhile, Samsung has enjoyed considerable success in the sectors with its Galaxy range of products.
The demand for tablet PCs and smartphones is likely to grow even further in the near term.
Analysts said that given the growth potential, the two firms were using every possible tactic to ensure that they capture a bigger share of the market.
“They are going to use every legal manoeuvre they can, including patent battles, to keep each other out of the market,” Tim Charlton of Charlton Media told the BBC.
Global tablet sales forecasts