[proofplan]
The connected components of the Dynkin diagram determine a partition of the simple roots. Since vertices in distinct components are joined by no edge, the corresponding off-block Cartan matrix entries vanish, and a simultaneous permutation of rows and columns puts $A$ into block diagonal form. The Lie algebra then splits because the Chevalley generators attached to different components commute, so the subalgebras generated by each component are mutually commuting ideals. Finally, connectedness of each component gives irreducibility of the corresponding root system, hence each summand is simple.
[/proofplan]
[step:Put the Cartan matrix into component block form]
Let $I=\{1,\dots,n\}$ be the vertex set of $\Gamma(A)$, and write
\begin{align*}
I = I_1 \sqcup \cdots \sqcup I_r
\end{align*}
for its connected components. Choose a permutation $\sigma$ of $I$ such that the elements of $I_1$ occur first, then the elements of $I_2$, and so on.
For $i \in I_k$ and $j \in I_\ell$ with $k \ne \ell$, the vertices $i$ and $j$ lie in different connected components of $\Gamma(A)$. Hence there is no edge between them. By the definition of the Dynkin diagram of a generalized Cartan matrix, this means
\begin{align*}
a_{ij}=a_{ji}=0.
\end{align*}
Therefore all entries of $A$ outside the component submatrices vanish after the simultaneous row-column permutation $\sigma$. Thus
\begin{align*}
A^\sigma =
\begin{pmatrix}
A_1 & 0 & \cdots & 0 \\
0 & A_2 & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & A_r
\end{pmatrix},
\end{align*}
where $A_k=(a_{ij})_{i,j \in I_k}$.
[/step]
[step:Define the component subalgebras]
Let $\mathfrak{g}=\mathfrak{g}(A)$ be the semisimple Lie algebra associated to $A$. Let
\begin{align*}
\Pi=\{\alpha_i : i \in I\}
\end{align*}
be its set of simple roots, and let $e_i,f_i,h_i$ denote Chevalley generators corresponding to $\alpha_i$ for $i \in I$.
For each $k \in \{1,\dots,r\}$, define $\mathfrak{g}_k$ to be the Lie subalgebra of $\mathfrak{g}$ generated by
\begin{align*}
\{e_i,f_i,h_i : i \in I_k\}.
\end{align*}
The defining Chevalley-Serre relations among these generators involve exactly the submatrix $A_k=(a_{ij})_{i,j \in I_k}$. Hence the Lie algebra $\mathfrak{g}_k$ is naturally isomorphic to the semisimple Lie algebra $\mathfrak{g}(A_k)$ associated to the Cartan matrix $A_k$.
[/step]
[step:Show that different component subalgebras commute]
Let $k \ne \ell$, let $i \in I_k$, and let $j \in I_\ell$. From the previous block computation,
\begin{align*}
a_{ij}=a_{ji}=0.
\end{align*}
The Chevalley relations give
\begin{align*}
[h_i,h_j]&=0, &
[h_i,e_j]&=a_{ij}e_j=0, &
[h_i,f_j]&=-a_{ij}f_j=0,
\end{align*}
and similarly
\begin{align*}
[h_j,e_i]=0, \qquad [h_j,f_i]=0.
\end{align*}
Also, for distinct simple roots,
\begin{align*}
[e_i,f_j]=0.
\end{align*}
Since $a_{ij}=0$, the Serre relation gives
\begin{align*}
(\operatorname{ad} e_i)^{1-a_{ij}}(e_j)=(\operatorname{ad} e_i)(e_j)=[e_i,e_j]=0,
\end{align*}
and similarly
\begin{align*}
[f_i,f_j]=0.
\end{align*}
Thus every generator of $\mathfrak{g}_k$ commutes with every generator of $\mathfrak{g}_\ell$. Since Lie brackets are bilinear and satisfy the Leibniz rule through iterated brackets, it follows that
\begin{align*}
[\mathfrak{g}_k,\mathfrak{g}_\ell]=0
\end{align*}
for all $k \ne \ell$.
[guided]
We need to prove more than the fact that the simple generators in different components are unrelated: we need their generated Lie subalgebras to commute. Let $i \in I_k$ and $j \in I_\ell$ with $k \ne \ell$. Because $i$ and $j$ are in different connected components of the Dynkin diagram, there is no edge between them, so the Cartan matrix entries satisfy
\begin{align*}
a_{ij}=a_{ji}=0.
\end{align*}
Now we check each type of Chevalley generator. The Cartan generators commute by the Chevalley relation:
\begin{align*}
[h_i,h_j]=0.
\end{align*}
The Cartan action on root generators is also zero across components:
\begin{align*}
[h_i,e_j]=a_{ij}e_j=0,
\qquad
[h_i,f_j]=-a_{ij}f_j=0.
\end{align*}
Interchanging $i$ and $j$ gives
\begin{align*}
[h_j,e_i]=0,
\qquad
[h_j,f_i]=0.
\end{align*}
For opposite root generators belonging to distinct simple roots, the Chevalley relation gives
\begin{align*}
[e_i,f_j]=0.
\end{align*}
Finally, since $a_{ij}=0$, the Serre relation becomes
\begin{align*}
(\operatorname{ad} e_i)^{1-a_{ij}}(e_j)=(\operatorname{ad} e_i)(e_j)=[e_i,e_j]=0,
\end{align*}
and the corresponding negative-root relation gives
\begin{align*}
[f_i,f_j]=0.
\end{align*}
Thus each generator from the $k$-th component commutes with each generator from the $\ell$-th component. Since $\mathfrak{g}_k$ and $\mathfrak{g}_\ell$ are generated as Lie algebras by those generators, repeated use of bilinearity and the Jacobi identity propagates this commutation relation to all iterated brackets. Therefore
\begin{align*}
[\mathfrak{g}_k,\mathfrak{g}_\ell]=0.
\end{align*}
[/guided]
[/step]
[step:Identify the sum of the component subalgebras with the whole Lie algebra]
The Lie algebra $\mathfrak{g}$ is generated by the full set
\begin{align*}
\{e_i,f_i,h_i : i \in I\}.
\end{align*}
Since $I=I_1 \sqcup \cdots \sqcup I_r$, every generator of $\mathfrak{g}$ belongs to one of the subalgebras $\mathfrak{g}_k$. Hence
\begin{align*}
\mathfrak{g}=\mathfrak{g}_1+\cdots+\mathfrak{g}_r.
\end{align*}
Because $[\mathfrak{g}_k,\mathfrak{g}_\ell]=0$ for $k \ne \ell$, each $\mathfrak{g}_k$ is an ideal in $\mathfrak{g}$: if $x \in \mathfrak{g}_k$ and $y=\sum_{\ell=1}^r y_\ell$ with $y_\ell \in \mathfrak{g}_\ell$, then
\begin{align*}
[y,x]=[y_k,x]+\sum_{\ell \ne k}[y_\ell,x]\in \mathfrak{g}_k.
\end{align*}
It remains to see that the sum is direct. Let
\begin{align*}
x \in \mathfrak{g}_k \cap \sum_{\ell \ne k}\mathfrak{g}_\ell.
\end{align*}
Since $\mathfrak{g}_k$ commutes with every $\mathfrak{g}_\ell$ for $\ell \ne k$, the element $x$ commutes with every summand $\mathfrak{g}_\ell$, including $\mathfrak{g}_k$ because $x$ lies in the commuting complementary sum. Therefore $x$ commutes with all of $\mathfrak{g}$. The center of a semisimple Lie algebra is zero, so $x=0$. Hence
\begin{align*}
\mathfrak{g}=\mathfrak{g}_1\oplus\cdots\oplus\mathfrak{g}_r.
\end{align*}
[/step]
[step:Use connectedness to identify the summands as simple Lie algebras]
For each $k$, the Dynkin diagram $\Gamma_k$ is connected by definition of connected component. Therefore the root system generated by the simple roots
\begin{align*}
\Pi_k=\{\alpha_i : i \in I_k\}
\end{align*}
is irreducible: if it decomposed as an orthogonal disjoint union of two nonempty root subsystems, then the corresponding simple roots would split into two nonempty subsets with no Dynkin edges between them, contradicting connectedness of $\Gamma_k$.
Let $\mathfrak{a}$ be a nonzero ideal of $\mathfrak{g}_k$. Since $\mathfrak{g}_k$ is finite-dimensional semisimple, $\mathfrak{a}$ is a direct sum of some of its simple ideals. Equivalently, the roots whose root spaces lie in $\mathfrak{a}$ form a root subsystem orthogonal to the roots belonging to the complementary ideal. Irreducibility of the root system of $\mathfrak{g}_k$ forces one of these two subsystems to be empty. Since $\mathfrak{a}\ne 0$, the complementary subsystem is empty, and therefore
\begin{align*}
\mathfrak{a}=\mathfrak{g}_k.
\end{align*}
Thus $\mathfrak{g}_k$ is simple. Since $\mathfrak{g}_k \cong \mathfrak{g}(A_k)$, each summand is the simple Lie algebra attached to the connected Dynkin diagram $\Gamma_k$.
Combining this with the direct-sum decomposition from the previous step gives
\begin{align*}
\mathfrak{g}(A)\cong \mathfrak{g}(A_1)\oplus\cdots\oplus\mathfrak{g}(A_r),
\end{align*}
as required.
[/step]