Traditional deep neural networks (DNNs) have bad performance on estimating off-grid angles, and the most direct solution is to increase the number of output classes for improving angular resolution. But more output classes can weaken the model accuracy of DNNs and thus decreasing the direction-of-arrival (DOA) estimation accuracy. In this work, a tree-model based deep neural networks (TDNN) is proposed, which contains H layers and each layer is consist of multiple small-scale DNNs. From the first layer to the last layer of TDNN, the angular region is gradually divided into smaller subregions by these DNNs, and the estimated DOA is finally obtained by cumulative calculating the classification results of all the layers. TDNN can improve the angular resolution by increasing the number of layers or the number of DNNs in any layer instead of changing the structure of single DNN, so the model accuracy of TDNN will not decrease with the improvement of angular resolution and its estimation performance is also stable. In addition, the Q-TDNN method is also proposed for multi-sources DOA estimation, which can obtain Q different DOAs from the same signals by combining Q independent and parallel TDNNs. The simulation results validate TDNN has much better estimation performance than traditional methods in both single-source and multi-sources cases, especially at low signal-to-noise ratio (SNR).