In recent years, precise economic forecasting has primarily relied on econometric models, which often assume linearity and stationarity in time series data. However, the nonlinear and dynamic nature of economic data calls for more innovative approaches. Machine learning (ML) techniques offer significant advantages over traditional methods by capturing complex, nonlinear patterns without predefined specifications. This study investigates the effectiveness of Long Short-Term Memory (LSTM) networks for forecasting Gross Domestic Product (GDP) in a univariate setting using quarterly Romanian GDP data spanning from 1995 to 2023. The dataset encompasses significant economic events, including the 2008 financial crisis and the COVID-19 pandemic, highlighting its relevance for broader economic forecasting applications. While the univariate approach simplifies model development, it also limits the incorporation of additional economic indicators, potentially affecting generalizability. Furthermore, computational challenges, such as time-intensive hyperparameter tuning, emerged during model optimization. We implemented LSTM networks with input data based on four and six lags to predict GDP and compared their performance with Seasonal Autoregressive Integrated Moving Average (SARIMA), a classical econometric method. Our results reveal that LSTM networks consistently outperformed SARIMA in predictive accuracy, demonstrating their robustness in capturing economic trends. These findings underscore the potential of ML in enhancing economic forecasting methodologies.