The U.S. and China are close to a trade deal that could lift most or all U.S. tariffs as long as Beijing follows through on pledges ranging from better protecting intellectual-property rights to buying a significant amount of American products, two people familiar with the discussions said.