Reverberation is a major problem for time delay estimation (TDE) in enclosed environments. In this paper, a robust TDE method based on the generalized cross-correlation (GCC) is proposed. An efficient preprocessing technique to calculate the all-pass component is introduced to improve the performance of GCC-based techniques in reverberant conditions. Performance results are given which demonstrate that the proposed approach provides better performance for a wide range of microphone locations and reverberation times. Results in real acoustic environments confirm the effectiveness of the proposed TDE method. Compared to other TDE methods, our solution has low computational complexity and can be employed in real-time applications.