NEW YORK—Bill de Blasio, the 6-5 mayor of the nation’s largest city, slipped in almost unnoticed through a side door in the small community center in Chelsea, where a full-throated anti-Donald Trump resistance meeting was already underway. Ten days earlier, Trump had been elected the next president of the United States, and New York City, which voted overwhelmingly against him, was still reeling.