Sustainable cities and people's well-being depend on efficient and reliable public transportation networks. To improve the reliability of bus arrival forecasts, we offer a new method that uses Internet of Things (IoT) data and advanced Gradient Boosting Machine learning algorithms to combine the two. Using real-time information from IoT sensors installed on buses and at strategic nodes along their routes, it constructs a comprehensive dataset that accounts for many variables contributing to bus transit delays, such as traffic, weather, and passenger load. Then, it creates superior prediction models than conventional approaches. It uses Gradient Boosting, an effective ensemble learning methodology. The findings will lead to a more dependable and efficient public transportation system by improving the accuracy of predicted bus arrival times. It helps in the continuous struggle over urban problems with mobility and sets the path for more data-driven, efficient improvement of public transportation.