OPC Unified Architecture (UA) has become the core communication interface specification in Industry 4.0. However, due to the slow update of equipment in the industrial field, the traditional communication protocol is still used by a large number of field devices, and distinct communication protocols may be adopted by different equipment manufacturers. An OPC UA gateway is designed to integrate different types of field devices into OPC UA architecture, and it can break the data exchange barriers between communication protocols. An OPC UA server is implemented in the gateway, which can connect communication protocol data to the nodes in address space of the server. The OPC UA server also enables MES and ERP management software to access data efficiently. At the same time, a graphical modeling method is designed to assist users in establishing an OPC UA information model and configuring gateway data acquisition logic. Finally, an example is given to verify the usability of the gateway for graphical online modeling.