TARTU, Estonia—All along the edges of Western Europe, new and hard-to-defeat strains of tuberculosis are gaining a foothold, often moving beyond traditional victims—alcoholics, drug users, HIV patients—and into the wider population.

Which is why Irina Nikolajeva, a petite 34-year-old former furniture saleswoman, spent the better part of four months in virtual lockdown here last year. She was resistant to all but one of 10 TB drugs. Nobody could figure out how she even caught...