SEOUL—Samsung Electronics Co. cleared one of the biggest hurdles it has faced so far in its patent dispute with Apple Inc. when a judge decided that the South Korean company could continue selling its Galaxy products in the U.S. until the case goes to trial.

A federal court judge in San Jose, Calif., on Friday denied Apple's request for a preliminary injunction that would have banned the sale of three Samsung smartphones and a tablet computer in the U.S. pending the outcome of a product-copying lawsuit Apple brought against...