Timely prediction of bearing faults is essential for minimizing unexpected machine downtime and improving industrial equipment’s operational dependability. The Q transform was utilized for preprocessing the sixty-four vibration signals that correspond to the four bearing conditions. Additionally, statistical features, also known as attributes, are extracted from the Histogram of Oriented Gradients (HOG). To assess these features, the Explainable AI (XAI) technique employed the SHAP (Shapely Additive Explanations) method. The effectiveness of the GRU, LSTM, and SVM models in the first stage was evaluated using training and tenfold cross-validation. The SSA optimization algorithm (SSA) was employed in a subsequent phase to optimize the hyperparameters of the algorithms. The findings of the research are rigorously analyzed and assessed in four specific areas: the default configuration of the model, the inclusion of selected features using XAI, the optimization of hyperparameters, and a hybrid technique that combines SSA and XAI-based feature selection. The GRU model has superior performance compared to the other models, achieving an impressive accuracy of 98.2%. This is particularly evident when using SSA and XAI-informed features. The subsequent model is the LSTM, which has an impressive accuracy rate of 96.4%. During tenfold cross-validation, the Support Vector Machine (SVM) achieves a noticeably reduced maximum accuracy of 84.82%, even though the hybrid optimization technique shows improvement. The results of this study usually show that the most effective model for fault prediction is the GRU model, configured with the attributes chosen by XAI, followed by LSTM and SVM.