Planning effective routes and monitoring vehicle traffic are essential for creating sustainable smart cities. Accurate speed prediction is a key component of these efforts, as it aids in alleviating traffic congestion. While their physical proximity is important, the interconnection of these road segments is what significantly contributes to the increase of traffic congestion. This interconnectedness poses a significant challenge to increasing prediction accuracy. To address this, we propose a novel approach based on Deep Graph Neural Networks (DGNNs), which represent the connectedness of road sections as a graph using Graph Neural Networks (GNNs). In this study, we implement the proposed approach, called STGGAN, for real-time traffic-speed estimation using two different actual traffic datasets: PeMSD4 and PeMSD8. The experimental results validate the prediction accuracy values of 96.67% and 98.75% for the PeMSD4 and PeMSD8 datasets, respectively. The computation of mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE) and mean absolute percentage error (MAPE) also shows a progressive decline in these error values with increasing iteration count, demonstrating the success of the suggested technique. To confirm the feasibility, reliability, and applicability of the suggested STGGAN technique, we also perform a comparison analysis, including several statistical, analytical, and machine-learning- and deep-learning-based approaches. Our work contributes significantly to the field of traffic-speed estimation by considering the structure and characteristics of road networks through the implementation of DGNNs. The proposed technique trains a neural network to accurately predict traffic flow using data from the entire road network. Additionally, we extend DGNNs by incorporating Gated Graph Attention Network (GGAN) blocks, enabling the modification of the input and output to sequential graphs. The prediction accuracy of the proposed model based on DGNNs is thoroughly evaluated through extensive tests on real-world datasets, providing a comprehensive comparison with existing state-of-the-art models for traffic-flow forecasting.