She was accompanied by Chief Secretary John Lee and the Secretary for Transport and Housing, Frank Chan.
They all kept their masks on but did not wear any extra protective gear.
Lam was seen looking up at times at buildings that were put under lockdown for mass testing, and stayed for about 15 minutes.
Some residents were heard shouting abuse at the top officials, with a man telling them to leave the “dangerous” area.
Lam did not answer reporters’ questions.