Maximum likelihood estimator of active time delay and passive time delay A typical time delay estimation problem has the model:
$$
\begin{align}
     x_1(t) &amp;= s(t)+ n_1(t) \\
    x_2(t) &amp;= a s(t-D) + n_2(t)
\end{align}
$$
Where $n_1$ and $n_2$ are considered to be Gaussian noise.
An active time delay estimation requires $n_1$ to be $0$ and $a=1$. 

The maximum likelihood estimator, in this case, is the matched filter or the basic cross-correlation method for finding delay. In passive case, $n_1$ is not equal to 0, and the maximum likelihood estimator is HT processor in Generalized Cross Correlation (GCC). 

Can someone provide me with an intuition why in active time delay estimation case, the matched filter performs favorably better than GCC, even if I know the spectra of my signal (i.e. the spectral estimates are accurate enough)?

I would expect both GCC and simple CC to give almost equal results. And also, my results vary when estimating time delay by cross correlation in time and frequency domain. Is there any explanation behind this?
Very intuitively, the Generalized Cross-Correlation is a "standard" cross-correlation of the windowed signals (I'll restrict myself to window-GCC, I'm pretty certain there's others, too!). Windowing happens to increase the "peakiness" of the cross-correlation.

It's basically down to the same trade-off between temporal and spectral precision that you consider when applying a window for the DFT. You trade energy in the "temporal edges" (read: start and end of the signal are attenuated by the window) for less leakage in the spectrum.

Now, back to your problem. In the active TDE definition you use, 

$$\begin{align}
R_{x_1x_2} =&amp; E\left\{x_1(t)x_2(t+\tau)\right\}\\
=&amp; E\left\{s(t)s(t+\tau)+ s(t)n_2(t+\tau)\right\}\tag1\\
=&amp;\underbrace{E\left\{s(t)s(t+\tau)\right\}}_\text{what contains the peak we're looking for}+ \underbrace{E\left\{s(t)n_2(t)\right\}}_\text{measurement noise}\tag2
\end{align}$$

Now, your GCC with a window $w$ looks something like (how $w$ is determined differs for different GCC approaches)

$$\begin{align}
\text{GCC}_{x_1x_2} =&amp; E\left\{w(t)x_1(t)\cdot w(t+\tau)x_2(t+\tau)\right\}\\
=&amp; E\left\{s(t)s(t+\tau)w(t)w(t+\tau)+\\
 s(t)n_2(t+\tau)w(t)w(t+\tau)\right\}\tag3
\end{align}$$

The step from $(1)$ to $(2)$ is intuitive, since the noise is uncorrelated to the signal we sent and received. (I'm assuming that, but it's a justifiable assumption given the problem statement.)

Now, in $(3)$ I'm tempted to say "ok, lets just pull $w(t)w(t+\tau)$ out of the expectation operator, right?", but I mustn't do that, since usually GCCs choose a $w$ based on $x_1$ and $x_2$; in other words, $w$ depends on $s$ and mustn't be treated like a deterministic function!

Information-theoretically, this means you introduce entropy into your $s(t)s(t+\tau)$ estimate by multiplying it with something that was estimated based on a measurement that includes noise. So, while $(2)$ only incorporates the noise-signal cross-correlation once, and since signal and noise are uncorrelated, with increasing length of observation, the error term in $(2)$ converges to zero. 

It's not that easy for $(3)$, especially without a specific noise model, but at the very least we can say that it should (by sheer arrogance and the intuitive application of the Cauchy-Schwarz Inequality), converge slower, if it converges at all towards the actual cross-correlation.

An oft-used practical GCC is GCC-PHAT, where $w$ is a function (usually: a reciprocal) of the Fourier Transform of an PSD estimate of $x_2$, which is pretty close to being the autocorrelation of $x_2$. Now, a reciprocal of an estimate that, should the observed duration of signal and noise be very long and if both the signal and the noise being rather whit, should contain a lot of values close to zero, is obviously rather instable, so this is an especially questionable choice in the case that $x_1$ doesn't contain noise of its own.