This study proposes the design of a robust controller based on a Sliding Mode Control (SMC) structure. The proposed controller, called Sliding Mode Control based on Closed-Form Continuous-Time Neural Networks with Gravity Compensation (SMC-CfC-G), includes the development of an inverse model of the UR5 industrial robot, which is widely used in various fields. It also includes the development of a gravity vector using neural networks, which outperforms the gravity vector obtained through traditional robot modeling. To develop a gravity compensator, a feedforward Multi-Layer Perceptron (MLP) neural network was implemented. The use of Closed-Form Continuous-Time (CfC) neural networks for the development of a robot’s inverse model was introduced, allowing efficient modeling of the robot. The behavior of the proposed controller was verified under load and torque disturbances at the end effector, demonstrating its robustness against disturbances and variations in operating conditions. The adaptability and ability of the proposed controller to maintain superior performance in dynamic industrial environments are highlighted, outperforming the classic SMC, Proportional-Integral-Derivative (PID), and Neural controllers. Consequently, a high-precision controller with a maximum error rate of approximately 1.57 mm was obtained, making it useful for applications requiring high accuracy.