Meteorological disasters on highways can significantly reduce road traffic efficiency. Low visibility caused by dense fog is a severe meteorological disaster that greatly increases the incidence of traffic accidents on highways. Accurately predicting highway visibility and taking timely countermeasures can mitigate the impact of meteorological disasters and enhance traffic safety. This paper introduces the ATCNet model for highway visibility prediction. In ATCNet, we integrate Transformer, Capsule Networks (CapsNet), and self-attention mechanisms to leverage their respective complementary strengths. The Transformer component effectively captures the temporal characteristics of the data, while the Capsule Network efficiently decodes the spatial correlations and hierarchical structures among multidimensional meteorological elements. The self-attention mechanism, serving as the final decision-refining step, ensures that all key temporal and spatial hierarchical information is fully considered, significantly enhancing the accuracy and reliability of the predictions. This integrated approach is crucial in understanding highway visibility prediction tasks influenced by temporal variations and spatial complexities. Additionally, this study provides a self-collected publicly available dataset, WD13VIS, for meteorological research related to highway traffic in high-altitude mountain areas. This study evaluates the model’s performance in terms of Mean Squared Error (MSE) and Mean Absolute Error (MAE). Experimental results show that our ATCNet reduces the MSE and MAE by 1.21% and 3.7% on the WD13VIS dataset compared to the latest time series prediction model architecture. On the comparative dataset WDVigoVis, our ATCNet reduces the MSE and MAE by 2.05% and 5.4%, respectively. Our model’s predictions are accurate and effective, and our model shows significant progress compared to competing models, demonstrating strong universality. This model has been integrated into practical systems and has achieved positive results.