Railway safety at level crossings remains a paramount concern due to the recurring incidence of train accidents. This study proposes an innovative solution to enhance safety by introducing an automatic gate system at unmanned crossings, replacing manual operation. The system utilizes strategically positioned proximity detectors to detect approaching trains, automating gate management. This reduces gate closure duration compared to manual operation, minimizing disruptions to road traffic. Additionally, the system reduces reliance on human labor, offering a more efficient and reliable solution. It is particularly suitable for unmanned crossings prone to higher accident probabilities, where dependable operation is crucial. By integrating infrared sensors and servo motors, the system ensures prompt gate closure upon train detection, reducing potential accidents caused by negligence. This study enhances prior research by utilizing two infrared sensors on each side of the track, improving train position tracking accuracy. The sensors are programmed using the LabVIEW platform, facilitating integration with myRIO controllers. Overall, this study presents a comprehensive approach to enhancing railway safety through innovative automation technology at unmanned level crossings. Keywords— NI myRIO, IR sensors, Servomotor, Labview.