HONG KONG—A Hong Kong court on Friday opened the door to potentially giving thousands of foreign household workers in the city a chance to apply for permanent residency, a decision likely to fuel further tensions over immigration and could mark a major change in Hong Kong's labor market and social fabric.

The legal victory by Evangeline...