Early and accurate detection of lung diseases plays a crucial role in improving treatment outcomes and reducing mortality rates, particularly in low-resource healthcare settings. Conventional auscultation using a stethoscope is a fundamental, fast, and affordable method for initial lung examination. However, its effectiveness is limited by subjectivity, as it depends on the examiner’s expertise and can be influenced by environmental noise. To overcome these limitations, this study proposes a deep learning approach for lung diseases classification using a combination of Gated Recurrent Unit (GRU) and Attention Mechanism with log Mel spectrogram as an input based on respiratory sound. Unlike previous works that employed standalone methods such as GRU or CNN, the integration of Attention mechanism in this study allows the model to focus on prominent temporal patterns within respiratory sounds, thereby enhancing classification accuracy. Experiments were conducted on the ICBHI 2017 dataset, which underwent preprocessing stages consisting of minor class removal, recording location restriction, data augmentation, and log Mel spectrogram feature extraction. The test results show that the model produces high performances with an accuracy of 90.85%, precision of 93%, recall of 90.85%, and an F1-score of 91.14%, outperforming several works that reported in prior studies. These results demonstrate the effectiveness of combining GRU and Attention mechanism in capturing the temporal features of respiratory signals. Future research could focus on enhancing model robustness through improved data quality, other model architecture, and multimodal integration for broader clinical applicability.