In the Industrial Internet of Things (IIoT), cloud computing faces enormous data processing pressure and security challenges due to the surge in industrial devices and sensors, especially in real-time data processing and analysis applications. However, fewer researchers study the reliability of data transmission and the maintenance of data interruption processing of edge cloud collaborative systems (ECCS) in IIoT. This paper proposes a maintenance optimization methodology of ECCS based on a gateway cost index. Firstly, a reliability model of different network topologies of ECCS is proposed considering key communication indicators of task runtime, packet loss rate, and bandwidth. Then, considering the impact of external environments on ECCS, an importance-based Gateway Cost Index is proposed. A maintenance optimization is studied by conducting a multi-objective programming. The specific maintenance steps are analyzed when the intelligent gateways of ECCS are subjected to large-scale failures caused by external interference. At last, two numerical examples with star topology and bus topology are provided to demonstrate the proposed methods.