U.S. national-security officials have ordered a Chinese company to sell gay-dating app Grindr, citing the risk that the personal data it collects could be exploited by Beijing to blackmail individuals with security clearances, according to people familiar with the situation.

The move by U.S. officials signals that a range of social-media companies and apps will now be off limits to Chinese buyers, alongside deals involving sensitive technology such as chips and weapons.

Beijing...