Celiac disease is a gluten-sensitive immune-mediated enteropathy of the small intestine that occurs in genetically predisposed individuals. Abnormal immune response results in mucosal inflammation, villous atrophy, and crypt hyperplasia. This study was a proof-of-concept exercise that used a convolutional neural network to classify hematoxylin and eosin (H&E) histological images of celiac disease, normal small intestine control, and non-specified duodenal inflammation; 7294, 11,642, and 5966 images, respectively. The trained network classified celiac disease images with high performance (accuracy 99.7%, precision 99.6%, recall 99.3%, F1-score 99.5%, and specificity 99.8%). Interestingly, when the same network (already trained for the 3 class images), analyzed duodenal adenocarcinoma (3723 images), the new images were classified as duodenal inflammation in 63.65%, small intestine control in 34.73%, and celiac disease in 1.61% of the cases. Finally, when the network was retrained using the 4 histological subtypes of images, all performance parameters were above 99% for celiac disease. In conclusion, the convolutional neural network (CNN)-based deep neural system was able to classify medical histological images with high performance. Narrow artificial intelligence (AI) is designed to perform tasks that typically require human intelligence, but it operates within limited constraints and is task specific.