I had a root canal done and within a year or so it's infected with bacteria. What could cause this? Is this dangerous?

Possible perio prob. If the root canal therapy was performed correctly, and there is not a fracture, recurrent decay, or untreated accessory or lateral canals, one possible cause could be a periodontal problem. Some infections of teeth can be a combined endodontic and periodontal problem. Any infection in the mouth has the potential for more severe problems and should be evaluated and treated.
Recurrent decay. Return to your dentist, or preferably to an endodontist, a root canal specialist, for diagnosis and treatment. Any infection is dangerous, so you need to have the infection resolved as quickly as possible.
Re-infected rt canal. There are several possibilities: 1. One or more canals were not totally cleaned and/or filled 2. There is another canal in the tooth that was not treated 3. There is a fracture in the root 4. The tooth was not restored so that the canals were sealed from bacteria in the mouth 5. The tooth decayed after the root canal was done see an endodontist to have the root canal redone.
Mistreatment/ yes. That is because either the root canal was not done properly, did not seal the root after nerve removal, or you did nor get a crown after the root canal was done for a long period of time can cause leakage and subsequent infections / it is dangerous you can loose the tooth or spread infection to other teeth, see a dentist to have it re treated asap ..
Germs R everywhere! Infection can cause pain, irritation, tooth loss, or even death. The cause is important, and treatment depends on you getting diagnosed appropriately. It sounds like you need an emergency visit to the dentist--do this right away. The longer you wait, the more your problem can have its way with your mouth.
Retreat ASAP. All the previous answers are correct. Loss of seal leads to the bacteria traveling down the treated root canal system and causing a new periapical infection. Also, root systems can be complex and nearly impossible to completely clean. The body may react to this left over nerve tissue with an infection in an attempt to "clean up" or the space may be reinfected by new bacteria leakage or systemic.
Reinfected? After the root canal was completed what else was done to the tooth. Most root canal teeth will need to have a crown made to protect the tooth from possible fracture and/or cosmetic embarrassment. You need to have it checked out asap however, some other reasons for this could be fracture in the tooth, accessory or extra canal that was not treated, periodontal issue, all of which need immediate care.
Lack of seal. Decay, fracture, washout of temporary filling, or anyyhing that causes the root canal to be exposed to the oral cavity will allow bacteria to enter.
See your dentist. Recurrent infection may be due to a root fracture or caries specially if the tooth has not been crowned. Best to see an endodontist if possible specially if tooth is multi-rooted. Retreatment may be necessary. If root is fractured it may be necessary to remove the tooth.