The massive Gospers Mountain bushfire burning north-west of Sydney was upgraded to an emergency warning on Sunday night as the fire threatened residents in several Blue Mountains towns.

The fire, which is creeping towards 400,000 hectares in size, was at 'watch-and-act' level early on Monday after firefighters worked overnight to contain the blaze around Mt Wilson, Mt Tomah and Berambing.

Dozens of buildings are feared damaged or destroyed, with reports some firefighters may have lost their homes.

Earlier, residents in Mount Irvine, Mount Wilson, Mount Tomah, Bilpin and Berambing had been told it was too late to leave.