[step: Show that the discriminant's square root detects parity]
Define the difference product
\begin{align*}
\delta \;=\; \prod_{i < j} (\alpha_i - \alpha_j),
\end{align*}
where $\alpha_1, \dots, \alpha_n$ are the roots of $f$ in a splitting field. Every $\sigma \in \operatorname{Gal}(f)$ permutes the roots, and this permutation acts on ordered pairs $(i,j)$ with $i < j$. A transposition of two roots flips exactly one factor $(\alpha_i - \alpha_j) \mapsto (\alpha_j - \alpha_i) = -(\alpha_i - \alpha_j)$, so
\begin{align*}
\sigma(\delta) \;=\; \operatorname{sgn}(\sigma)\,\delta.
\end{align*}
Therefore $\sigma(\delta) = \delta$ for every $\sigma \in \operatorname{Gal}(f)$ if and only if every $\sigma$ is an even permutation, i.e.\ $\operatorname{Gal}(f) \subseteq A_n$. By the fixed-field characterisation of the base field, this is exactly the condition $\delta \in K$.
[step: Translate the condition on $\delta$ into one on $\operatorname{disc}(f)$]
The discriminant is defined as
\begin{align*}
\operatorname{disc}(f) \;=\; \delta^2 \;=\; \prod_{i < j} (\alpha_i - \alpha_j)^2.
\end{align*}
Note that $\delta^2 \in K$ always, since every $\sigma$ satisfies $\sigma(\delta^2) = (\operatorname{sgn}(\sigma))^2 \delta^2 = \delta^2$. Now:
[guided: Why does $\delta \in K \iff \operatorname{disc}(f)$ is a perfect square in $K$?]
If $\delta \in K$, then $\operatorname{disc}(f) = \delta^2$ is literally the square of an element of $K$, hence a perfect square in $K$. Conversely, if $\operatorname{disc}(f) = c^2$ for some $c \in K$, then $\delta^2 = c^2$, so $\delta = \pm c \in K$.
Combining both steps:
\begin{align*}
\operatorname{Gal}(f) \subseteq A_n
\;\;\Longleftrightarrow\;\;
\delta \in K
\;\;\Longleftrightarrow\;\;
\operatorname{disc}(f) \text{ is a perfect square in } K. \qquad\blacksquare
\end{align*}