HONG KONG—A fire last month in a rundown tenement that left four people dead highlighted the challenge of providing affordable housing in this city of seven million—and turned up the pressure on the government to fix the problem.

The blaze swept through an eight-story building in the city's Kowloon section that consisted mainly of apartments subdivided into rental units as small as 100 square feet, a typical arrangement in older city districts. Even smaller "cage" or "coffin" units have as many as three beds stacked in a...