This document describes an automatic railway gate control system that replaces manually operated gates. It aims to reduce the time gates are closed and improve safety for road users. The system uses infrared sensors to detect approaching trains and automatically open and close the gate. When a "foreside" sensor detects an approaching train, the gate closes. It remains closed until the train triggers the "aft side" sensor, causing the gate to reopen. This automatic system reduces delays caused by late trains and removes the need for human gatekeepers. It provides reliable operation at unmanned crossings to improve safety. The document outlines the components, circuit design, and PCB layout for the automatic gate control system.