HONG KONG—Tensions are set to rise as pro-democracy protesters attempt to return to the streets after a lengthy lull amid the coronavirus pandemic, which authorities here and in Beijing have used to push hard against the opposition movement.

In recent weeks, Beijing officials have demanded that Hong Kong enact national-security legislation—which would ban treason, secession, sedition and subversion against the Chinese government—and condemned the tactics of an opposition lawmaker who is holding up passage of a law criminalizing...