South Korean officials are racing to contain the spread, and said most cases were linked to a single church and hospital nearby.