In our Automatic Railway Gates project, we address railway safety by implementing an automated gate system. Using machine learning algorithms, the system senses approaching trains and promptly closes railway crossing gates, preventing accidents and enhancing overall safety. Additionally, the project incorporates an alarming sound feature to alert animals and pedestrians, further reducing the risk of collisions and saving animals from train accidents.