Apple Inc. is weighing legal action and continuing to press the Trump administration to reverse its executive order on immigration, Chief Executive Tim Cook said in an interview.

Mr. Cook said hundreds of Apple employees have been affected by the order, which suspended entry to the U.S. for refugees and travelers from seven Muslim-majority nations. He added that he continues to contact “very, very senior people in the White House” and impress on them why repealing the executive order is important not only for Apple but for...