The implementation of precision machine tool thermal error compensation in edge-cloud-fog computing architecture has the potential to control the thermal error. However, the challenges faced by the successful implementation are described as follows: The data collection and transfer efficiency are low, and the control accuracy is not deficient. To address these challenges, a hardware design scheme is proposed for the high-performance intelligent gateway node based on the low-power processor architecture of ARM Cortex-A7. Moreover, a new transformer-improved-gate long short-term memory model is proposed, and then it is embedded into edge-cloud-fog computing architecture. With the implementation of gear profile grinding machine thermal error compensation in edge-cloud-fog computing architecture, the maximum values of the tooth profile tilt deviation are reduced from 17.4 μm to 5.4 μm and from 17.9 μm to 5.8 μm for the left and right tooth flanks, respectively. Moreover, the maximum values of the tooth profile deviation are reduced from 18.9 μm to 6.1 μm and from 18.2 μm to 5.8 μm for the left and right tooth flanks, respectively. Compared with the traditional collection mode, the response delay of the designed intelligent gateway in the acquisition mode is reduced by 40%.