This paper describes the design of the beam of a gantry robot for Computer numerical control (CNC) lathe that can automatically attach and detach a workpiece. The gantry robot takes the unprocessed workpiece from the stoker and mounts it on the chuck of a CNC lathe. The robot then removes the processed workpiece fixed to the chuck and places it in the processed workpiece stoker. The workpiece consists of a body, x-axis beam, x-axis driving device, y-axis beam, yaxis driving device, z-axis beam and z-axis driving device. Finite element analysis was performed to design the x-axis beam, the y-axis beam, and the z-axis beam. Based on the results, the optimal size of the x-axis beam was designed to have a size of 150 mm × 150 mm × 4681 mm with a thickness of 9 mm. The x-axis beam is less eccentric in the position of the chuck of the CNC lathe.