This paper presents a study and comparison of the most used learning algorithms for nonlinear autoregressive neural network with external input (NARX). These networks are successfully used to predict the time series. For this study, the data of methane (CH4) and carbon dioxide (CO2) concentrations in the surface layer of atmospheric air on the Arctic island Belyy, Russia were used. A time interval of 190 hours was chosen with the one-hour lag. Methane and carbon dioxide concentrations corresponding to the first 170 hours of the interval were used for train the NARX network. Then the forecast was made for the next 20 hours. Three techniques were used as the learning algorithms: Levenberg-Marquart (LM), LM with Bayesian regularization (BR), and gradient descent with adjustable speed parameters (GDA). The NARX model, which using the LM learning algorithm, was the most accurate for the both greenhouse gases. The application of this learning algorithm improved the predictive accuracy of the models from 9% to 12% for the methane and from 7% to 21% for carbon monoxide. The predictive problems in the field of dynamics of changes in the concentration of greenhouse gases can be effectively solved using artificial neural networks, in particular, NARX with the Levenberg-Marquart learning algorithm.