Gastric cancer has become a serious worldwide health concern, emphasizing the cru-cial importance of early diagnosis measures to improve patient outcomes. While tradi-tional histological image analysis is regarded as the clinical gold standard, it is la-bor-intensive and manual. Recognizing this problem, there has been a rise in interest in using computer-aided diagnostics tools to help pathologists with their diagnostic ef-forts. In particular, deep learning (DL) has emerged as a promising solution in this sector. However, current DL models are still restricted in their ability to extract exten-sive visual characteristics for correct categorization. To tackle this limitation, this study proposes the use of ensemble models, which incorporate the capabilities of sev-eral deep learning architectures and use aggregate knowledge of many models to im-prove classification performance, allowing for more accurate and efficient gastric cancer detection. To see how well these proposed models performed, this study com-pared them to other works, all of which were based on the Gastric Histopathology Sub-size Images Database, a publicly available dataset for gastric cancer. This research demonstrated that the ensemble models achieved high detection accuracy across all sub-databases, with an average accuracy exceeding 99%. Specifically, ResNet50, VGGNet, and ResNet34 performed better than EfficientNet and VitNet. For the 80 × 80 pixel sub-database, ResNet34 exhibited an accuracy of approximately 93%, VGGNet achieved 94%, and the ensemble model excelled with 99%. In the 120 × 120 pixel sub-database, the ensemble model showed 99% accuracy, VGGNet 97%, and ResNet50 approximately 97%. For the 160 × 160 pixel sub-database, the ensemble model again achieved 99% accuracy, VGGNet 98%, ResNet50 98%, and EfficientNet 92%, high-lighting the ensemble model's superior performance across all resolutions. Overall, the ensemble model consistently provided an accuracy of 99% across the three sub-pixel categories. These findings showed that ensemble models may successfully detect criti-cal characteristics from smaller patches and achieve high performance. The findings will help pathologists diagnose gastric cancer using histopathological images, leading to earlier identification and higher patient survival rates.