[proofplan]
The forward direction is immediate: characters are class functions ([Elementary Properties of Characters](/theorems/2421)), so conjugate elements have equal character values for every character. The converse rests on the **completeness of characters**: by [Completeness of Characters](/theorems/2424), the irreducible characters span $\mathcal{C}(G)$, so the indicator function $\delta$ of the conjugacy class of $g_1$ can be written as a linear combination $\delta = \sum_j m_j \chi_j$. Evaluating $\delta$ at $g_2$ in two ways — via the linear combination (which gives the same value as at $g_1$, by the assumption $\chi_j(g_1) = \chi_j(g_2)$) and via its definition (which gives $1$ iff $g_2$ is in the conjugacy class of $g_1$) — forces $g_2$ into that conjugacy class.
[/proofplan]
[step:Forward direction: conjugate elements have equal values under every character]
Suppose $g_1, g_2 \in G$ are conjugate: there exists $h \in G$ with $g_2 = h g_1 h^{-1}$. Let $\chi$ be any character of $G$ (not necessarily irreducible), afforded by a representation $\rho: G \to \operatorname{GL}(V)$. By Property 1 of [Elementary Properties of Characters](/theorems/2421), $\chi$ is a class function on $G$:
\begin{align*}
\chi(h g_1 h^{-1}) = \chi(g_1) \quad \text{for all } h \in G.
\end{align*}
Therefore $\chi(g_2) = \chi(h g_1 h^{-1}) = \chi(g_1)$.
Since this holds for every character $\chi$ of $G$, in particular for every irreducible character, the forward direction is established.
[/step]
[step:Converse setup: introduce the indicator function of the conjugacy class of $g_1$]
For the converse, suppose $\chi(g_1) = \chi(g_2)$ for every irreducible character $\chi$ of $G$. We show $g_2$ is conjugate to $g_1$.
Let $C \subseteq G$ denote the conjugacy class of $g_1$:
\begin{align*}
C = \{h g_1 h^{-1} : h \in G\}.
\end{align*}
Define the indicator function
\begin{align*}
\delta: G &\to \mathbb{C}, \\
g &\mapsto \begin{cases} 1 & \text{if } g \in C, \\ 0 & \text{otherwise}. \end{cases}
\end{align*}
Then $\delta = \mathbb{1}_C$. Since $C$ is a single conjugacy class, $\delta$ is constant on conjugacy classes (it equals $1$ on $C$ and $0$ on every other class), so $\delta \in \mathcal{C}(G)$.
Note in particular $\delta(g_1) = 1$ (since $g_1 \in C$).
[guided]
The strategy for the converse is to package "is $g_2$ conjugate to $g_1$?" as the question "what is $\delta(g_2)$?", where $\delta$ is the indicator function of the conjugacy class $C$ of $g_1$.
By construction, $\delta(g) = 1$ when $g \in C$ and $\delta(g) = 0$ when $g \notin C$. So:
\begin{align*}
g_2 \text{ conjugate to } g_1 \iff g_2 \in C \iff \delta(g_2) = 1.
\end{align*}
The whole point of using $\delta$ is that it lives in $\mathcal{C}(G)$ — being constant on conjugacy classes — and so it can be expanded in the basis of irreducible characters via [Completeness of Characters](/theorems/2424). Once expanded, the hypothesis $\chi_j(g_1) = \chi_j(g_2)$ for every $j$ forces $\delta(g_1) = \delta(g_2)$.
[/guided]
[/step]
[step:Expand $\delta$ in the basis of irreducible characters]
Let $\chi_1, \ldots, \chi_k$ be the irreducible characters of $G$. By Part 2 (spanning) of [Completeness of Characters](/theorems/2424), the irreducible characters span $\mathcal{C}(G)$. Combined with linear independence (Part 1, row orthogonality, equivalently [Row Orthogonality Relations](/theorems/2430)), they form a basis. Hence there exist unique $m_1, \ldots, m_k \in \mathbb{C}$ with
\begin{align*}
\delta = \sum_{j=1}^k m_j\, \chi_j.
\end{align*}
(The coefficients $m_j$ are not necessarily non-negative integers — $\delta$ need not be a character — but they are well-defined complex numbers.)
[guided]
We use the deep input. [Completeness of Characters](/theorems/2424) (Part 2) says the irreducible characters span the space $\mathcal{C}(G)$ of class functions. Together with linear independence (which follows from [Row Orthogonality](/theorems/2430)), the irreducible characters $\chi_1, \ldots, \chi_k$ form a basis of $\mathcal{C}(G)$.
Since $\delta \in \mathcal{C}(G)$, it has unique coefficients $m_j$ in this basis:
\begin{align*}
\delta = \sum_{j=1}^k m_j \chi_j.
\end{align*}
We do not need to compute the $m_j$ explicitly (although they could be extracted by inner products: $m_j = \langle \delta, \chi_j \rangle$). All we need is the existence of the expansion.
[/guided]
[/step]
[step:Evaluate the expansion at $g_1$ and $g_2$]
Evaluate the identity $\delta = \sum_j m_j \chi_j$ at $g = g_1$:
\begin{align*}
\delta(g_1) = \sum_{j=1}^k m_j\, \chi_j(g_1).
\end{align*}
Evaluate at $g = g_2$:
\begin{align*}
\delta(g_2) = \sum_{j=1}^k m_j\, \chi_j(g_2).
\end{align*}
By hypothesis, $\chi_j(g_1) = \chi_j(g_2)$ for every $j \in \{1, \ldots, k\}$. Substituting term by term:
\begin{align*}
\delta(g_2) = \sum_{j=1}^k m_j\, \chi_j(g_2) = \sum_{j=1}^k m_j\, \chi_j(g_1) = \delta(g_1) = 1.
\end{align*}
[/step]
[step:Conclude $g_2$ is conjugate to $g_1$]
By definition of $\delta$, the equality $\delta(g_2) = 1$ means $g_2 \in C$, i.e. $g_2$ is conjugate to $g_1$.
Combining with the forward direction (Step 1), we have established the biconditional: $g_1$ and $g_2$ are conjugate in $G$ if and only if $\chi(g_1) = \chi(g_2)$ for every irreducible character $\chi$ of $G$.
[guided]
We have just shown $\delta(g_2) = 1$. By the definition of $\delta = \mathbb{1}_C$, this means $g_2 \in C$, i.e. $g_2$ lies in the conjugacy class of $g_1$. So $g_2$ and $g_1$ are conjugate.
Stepping back: the irreducible characters separate conjugacy classes. Two elements are in the same class iff they cannot be distinguished by any irreducible character. The mechanism is that the irreducible characters span the space of class functions, so the indicator function of any class is reconstructible from its values $\chi_j(\cdot)$. If two points have all $\chi_j$-values equal, they have equal $\delta$-values for every class indicator $\delta$, hence belong to the same class.
[/guided]
[/step]