In a time division duplex (TDD) based massive multiple-input multiple-output (MIMO) system, a base station (BS) needs accurate estimation of channel state information (CSI) for a user terminal (UT). Due to the time-varying nature of the channel, the length of pilot signals is limited and the number of the orthogonal pilot signals is finite. Hence, the same pilot signals are required to be reused in neighboring cells and thus its channel estimation performance is deteriorated by pilot contamination from the neighboring cells. With the minimum mean square error (MMSE) channel estimation, the influence of pilot contamination can be reduced by the fully known covariance matrix of channels for all the UTs using the same pilot signal. However, this matrix is unknown to the BS a priori, and has to be estimated. In this paper, we propose two methods of deep learning aided channel estimation to reduce the influence of pilot contamination. One method uses a neural network consisting of fully connected layers, while the other method uses a convolutional neural network (CNN). The neural network, particularly the CNN, plays a role in extracting features of the spatial information from the contaminated signals. In terms of the speed of training, the former method is better than the latter one. We evaluate the proposed methods under two scenarios, i.e., perfect timing synchronization and imperfect one. Simulation results confirm that the proposed methods are better than the LS and the covariance estimation method via normalized mean square error (NMSE) of the channel.