It is used to treat erosive esophagitis (damage to the esophagus from stomach acid caused by gastroesophageal reflux disease, or GERD) in adults and children who are at least 5 years old. Pantoprazole is usually given for up to 8 weeks at a time while your esophagus heals