never before having been in a museum with such an extensive collection 是一个以having为核心的分词短语,做句子的状语.
never before had they been in a museum with such an extensive collection 是一个以否定词开头的完整的倒装句(主语是they,谓语是never had been).
在题目中,collection的后面是逗号,逗号后面是个完整的陈述句,所以逗号前不能再写成完整的句子了(英语里不允许用逗号连接两句话),只能写成短语或从句,因此...having been...是正确的.