Several ailments can create openings in your tooth, through which bacteria can enter. Tooth decay, cracks, badly placed fillings, or trauma to the tooth can all leave your teeth open to infection.