Nowadays, the analysis of gastrointestinal (GI) tract disease utilzing endoscopic image classification becomes an active research activity from the biomedical sector. The latest technology in medical imaging is Wireless Capsule Endoscopy (WCE) for diagnosing gastrointestinal diseases namely bleeding, ulcer, polyp, and so on. Manual diagnoses will be time taking and tough for the medical practitioner; thus, the authors have designed computerized approaches for classifying and detecting such diseases. Many research groups presented various machine learning (ML) and image processing methods for classifying GI tract diseases in recent times. Conventional data augmentation and image processing methods are integrated with adjusted pre-trained deep convolutional neural networks (CNNs) for classifying diseases in the GI tract from WCI images. This study presents a Modified Salp Swarm Algorithm with Deep Learning based Gastrointestinal Tract Disease Classification (MSSADL-GITDC) on Endoscopic Images. The presented MSSADL-GITDC technique mainly focuses on the examination of WCE images for GIT classification. To accomplish this, the presented MSSADL-GITDC technique applies median filtering (MF) technique for image smoothening. The presented MSSADL-GITDC technique designs improved capsule network (CapsNet) model for feature extraction where the CapsNet model is modified by the class attention layer (CAL). Moreover, MSSA based hyperparameter tuning process is performed to improve the efficiency of the improved CapsNet model. For GIT classification, deep belief network with extreme learning machine (DBN-ELM) was used. Finally, backpropagation is applied for supervised fine tuning of the DBN-ELM model. The experimental validation of the MSSADL-GITDC technique takes place on Kvasir-V2 database reported the betterment of the MSSADL-GITDC technique on GIT classification with maximum accuracy of 98.03%.