The good old factorial is defined line $n!:=\prod_{k=1}^{n}k$.
Given this definition it is fairly easy to arrive to some recursive formulas such as \begin{equation} n!=(n-m)!\prod_{k=1}^{m}(n-m+k)\text{, } \end{equation} or, equivalently, $(n+m)!=n!\prod_{k=1}^{m}(n+k)$.
If $n$ is large, it is intuitively true that $\prod_{k=1}^{m}(n+k)\sim n^m$, written in precise terms \begin{equation} \lim_{n\to\infty}\frac{n^m}{\prod_{k=1}^{m}(n+k)}=1\text{. } \end{equation} Then, multiplying both sides by $m!$ we have that \begin{equation} m!=\lim_{n\to\infty}\frac{n^mm!}{\prod_{k=1}^{m}(n+k)}=\lim_{n\to\infty}\frac{n^mm!}{\frac{(m+n)!}{n!}}=\lim_{n\to\infty}\frac{n^mm!n!}{m!\prod_{k=1}^{n}(m+k)}=\lim_{n\to\infty}\frac{n^mn!}{\prod_{k=1}^{n}(m+k)}\text{, } \end{equation} so, to sum up, we have the following expression, which allows us to potentially compute the "factorial" of any real number $x$ (except for the negative integers) \begin{equation} x!=\lim_{n\to\infty}\frac{n^xn!}{\prod_{k=1}^{n}(x+k)}\text{. } \end{equation}
It is known that this expression is a shifted version of the Gamma function, but why? And I mean, really why? I have read a proof here, but it is pretty magical and non informative, the appropiate function just appears out of thin air.
My main goal is trying to derive the Gamma function integral formula from scratch.
Here is a hint:
Theorem. (Bohr-Mollerup)
If a function $f(x)$ satisfies the following three conditions, then it is identical in its domain of definition with the Gamma function:
It can be shown that
\begin{equation} f(x)=\lim_{n\to\infty}\frac{n^xn!}{\prod_{k=1}^{n}(x+k)}\text{. } \end{equation}
Satisfy these conditions and hence is identical to the Gamma function.
It is important to note that not all the functions that satisfy the functional equation
$$ f(x+1) = xf(x), \;\; f(1)=1$$ can be called "Gamma". The property that determine a Gamma function is the log-convexity.
Please see the proof of the Bohr-Mollerup theorem here (is a little bit extensive) and through it you will discover that $\Gamma(x) = f(x)$