This paper proposes an improved SegNet-based deep learning framework for retinal layer segmentation in optical coherence tomography (OCT) images, which is essential for diagnosing diseases such as glaucoma, diabetic retinopathy, and age-related macular degeneration. To address the limitations of existing deep learning models, which lack interpretability and require time-consuming and highly variable manual segmentation, we employ structural innovations, including a modified pooling strategy, to enhance feature extraction from noisy OCT images. Furthermore, we improve performance by using a hybrid loss function combining categorical cross-entropy loss and Dice loss. Furthermore, we integrate Grad-CAM, which provides visual explanations of model decisions, enabling clinical validation. Training and validation on the Duke OCT dataset yielded a validation accuracy of 95.77%, a Dice coefficient of 0.9446, and a Jaccard Index of Interference (IoU) of 0.8951. While the model struggled with thin edges, it performed strongly across most layers. Grad-CAM visualization highlighted anatomically relevant regions, aligning segmentation results with clinical biomarkers and enhancing transparency. We present a high-performance SegNet-based framework that bridges the gap between accuracy and interpretability by combining structural refinement, customized hybrid loss, and explainable AI. This approach offers powerful potential for standardizing OCT analysis, improving diagnostic efficiency, and enhancing clinical confidence in AI-based ophthalmic tools.