Infectious esophagitis is the result of an infection. The infection may be caused by bacteria or viruses. It may also be caused by a fungus or parasite. It happens most often in people with weakened immune systems, such as people with HIV/AIDS or cancer.