China said it would retaliate against the European Union if it proceeds with a proposal to ban Huawei Technologies Co.’s equipment across the continent, escalating tensions in the long-running clash over national security and the communications company’s products.