With the rapid development of Industry 4.0, industrial big data has become a hot topic in the field of smart manufacturing. However, the large-scale data flow generated by industrial IoT also has serious security challenges. This paper proposes a new multi-module intrusion detection system: DWGF-IDS, which consists of three modules: feature extraction, imbalance processing and traffic anomaly detection. Firstly, a deep denoising autoencoder is used to extract the deep feature representation of the data and improve the generalization performance of the detection model by adding noise to the autoencoder. Secondly, a Wasserstein Generative Adversarial Network -Gradient Penalty optimized based on the self-attention mechanism is used to generate a few classes in the anomalous traffic. Finally, the weights and bias values in the deep denoising autoencoder are transferred to the deep neural network structure, and a DNN improved based on focal loss is used to implement multi-classification detection on the reduced dimensional balanced traffic data. The system performance was evaluated using two datasets, namely NSL-KDD and CSE-CIC-IDS-2018. The multi-classification accuracy achieved on these datasets were 85.05% and 99.57%, respectively. The experimental results show that DWGF-IDS effectively copes with the high dimensionality and imbalance of IoT data, improves the detection rate of unknown attacks, and improves the misclassification of rare classes of attack traffic.