Gearbox fault diagnosis is vital to ensure the efficient operation of rotating machinery, and most gearbox faults in industrial production occur in the form of compound faults. To realize the diagnosis of compound faults in gearboxes at different speeds, an “end-to-end” intelligent diagnosis method based on an efficient channel attention capsule network (ECA-CN) is proposed. First, the process uses a deep convolutional neural network to extract fault features from the collected raw vibration signals, embeds the efficient channel attention module to filter important fault features, uses the capsule network to vectorize the feature space information and, finally, calculates the correlation between different levels of capsules using a dynamic routing algorithm to achieve accurate gearbox compound fault diagnosis. The effectiveness of the proposed ECA-CN fault diagnosis method is verified using the composite fault dataset of the 2009 PHM Challenge gearbox, with an average accuracy of 99.63 ± 0.22%. In the comparison experiments using the traditional fault diagnosis method, the average accuracy of the ECA-CN method improved by 4.62%, and the standard deviation was reduced by 0.58%. The experimental results show that the ECA-CN has a more competitive diagnostic performance than traditional shallow machine learning models and CNNs.