A novel precoding method based on supervised deep neural networks is introduced for the multiple-input multiple-output Gaussian wiretap channel. The proposed deep learning (DL)-based precoding learns the input covariance matrix through offline training over a large set of input channels and their corresponding covariance matrices for efficient, reliable, and secure transmission of information. Furthermore, by spending time in offline training, this method remarkably reduces the computation complexity in real-time applications. Compared to traditional precoding methods, the proposed DL-based precoding is significantly faster and reaches near-capacity secrecy rates. DL-based precoding is also more robust than transitional precoding approaches to the number of antennas at the eavesdropper. This new approach to precoding is promising in applications in which delay and complexity are critical.