Equation (3) is a practical symmetrical estimation of Equation (2) when the observation time $T$ increases. Equation (2) is a reformulation of Equation (1) using the concept of ergodicity.
Here, $X(t)$ is modeled as a continuous random variable. I see it as a variable phenomenon that can takes observed values at time $t$, depending on some probability law $p_X(u)$. Those values can in generally be "anything", and we cannot say more about that.
In analyzing such a process, you can be interested in some "expected values" that one is more likely to consider. For instance, you could be interested in the mean of $X$ for each time $t$. This is the "meaning" of what expectation does:
$$\mu_X(t) = E[X(t)] $$
This quantity is evaluated for each $t$ by integrating the probably density function of $X$. Many other moments of $X$ can be evaluated in the same way, so you can replace $X$ in the above formula by $X(t)X(t+\tau)$, and you get the process autocorrelation, a kind on average of the product at lag $\tau$.
Very often, the actual probably density function is not known, and maybe we don't need it to access to those average values. So we often make additional assumptions, like stationnarity (the probably does not change over time) and ergodicity (the expected values of "some property" at time $t$ can be estimated by averaging over times. This is typically done with discrete signals, as answered by Matt L.. You can learn more with the excellent SE.DSP answer of Dilip Sarwate What is the distinction between ergodic and stationary?.
So with an ergodicity assumption, one can estimate moments (eg autocorrelation) by time averaging (Eq. 2). Alas, we generally don't know the process over all times. Most signals have finite support. So, one expects that the knowledge would be better as $T$ increases. And a part of process analysis and spectral estimation is devoted to "how fast we converge to the true expectation" as $T\to\infty$, in order to bound estimation errors.
As there are several avatars of ergocity, I will summarized the definitions given in Ergodic process: if $X(t)$ is a wide-sense stationary process, with constant zero-mean $\mu_X(t)=0$, with autocovariance:
$$R_{XX}(\tau) = E([X(t)X(t+\tau)])$$
which is called an ensemble average. Let us define the symmetric time average quantity:
$$r_{XX}(T) = \frac{1}{2T}\int^{-T}_{-T}X(t)X(t+\tau)\mathrm{d}t$$
Then, the process $X$ is said to be autocovariance-ergodic if $r_{XX}(T)$ converges in the least-squares sense to $R_{XX}(\tau)$ as $T\to \infty$.
For dynamical systems, or for processes with known generating mechanism or even better known probability law, ergodicity can be proved or disproved...
But this is more a definition/hypothesis than something that could be mathematically derived in general (as far as I know).
Related answers: