A gas explosion at a Bucks County nursing home Tuesday afternoon triggered a plume of black smoke and trapped people inside the building, authorities said.