Qualitative and quantitative detection of the composition of gaseous mixtures remains challenging in acoustic gas sensing. Traditional feature-based methods attempt to extract local features from complex numerical models, but tend to ignore crucial information owing to the lack of a global view. Deep learning can achieve competitive performance in acquiring information. This study proposes an attention recurrent gas detection (ARGD) neural network for gas sensing based on acoustic relaxation spectroscopy. This model combines a bidirectional gated recurrent unit to extract gas information and an attention module to determine the crucial features. The processed features were input into a double-task network for simultaneous prediction of the types of gas and their respective concentrations. Samples of natural gas involving CO2, CH4, and N2 were identified with six acoustic sensor pairs. The simulated and experimental results demonstrate the effectiveness and robustness of the proposed model. A classification accuracy of up to 99% was achieved, with the root mean squared error declining to 0.67%. The combination of deep learning and acoustic relaxation spectroscopy provides new ideas for further research of acoustic gas detection.