WASHINGTON—A federal appeals court on Thursday gave Apple Inc. new legal leverage over Samsung Electronics Co. in the smartphone wars, ruling the iPhone maker was entitled to an injunction barring Samsung from using certain phone features that violated Apple’s patents.

“Samsung’s infringement harmed Apple by causing lost market share and lost downstream sales and by forcing Apple to compete against its own patented invention,” the U.S. Court of Appeals for the Federal Circuit said in a ruling that deeply divided the three...