A gastroenterologist is a doctor who specializes in all disorders related to the gut, including constipation.