Indeed define $K_0 = X$. Then define $K_{n+1} = f[K_n]$ for all $n \ge 0$.
By induction all $K_n$ are compact subspaces of $X$ and for all $n$:
$K_{n+1} \subseteq K_n$:
Both clearly hold for $n=0$. And if $K_n$ is compact and $K_{n+1} \subseteq K_n$, then $K_{n+1} = f[K_n]$ is compact as the continuous image of a compact set,
and $K_{n+2} = f[K_{n+1}] \subseteq f[K_n] = K_{n+1}$, as function images preserve inclusions.
Finally define $K=\cap_n K_n$. (it doesn't mattter whether we start from $n=0$ or $n=1$ as $K_0 = X$ has no effect.) Then $K$ is closed as an intersection of closed (compact in Hausdorff implies closed) sets. It is also non-empty as a decreasing intersection of non-empty closed sets in a compact space.
Clearly $$K = \bigcap_{n\ge 1} K_n = \bigcap_{n \ge 1} f[K_{n-1}] \supseteq f[\bigcap_{n \ge 1} K_{n-1}] = f[\bigcap_{n \ge 0} K_n] = f[K]$$
So $f[K] \subseteq K$. To see that the reverse holds:
Let $x \in K$ then for all $n$, $x \in K_{n+1}$ so that $F_n = K_n \cap f^{-1}[\{x\}]$ is non-empty and all $F_n$ are also closed (Hausdorff implies singleton sets are closed) thus compact.
So the sets $F_n$ are also a decreasing family of non-empty closed sets and so
$$\cap_n F_n \neq \emptyset$$
And note that a $p \in \cap_n F_n$ has the property that $p \in K$ and $f(p) = x$, so that $K \subseteq f[K]$.
"...every subspace of compact Hausdorff is closed."
I'm not sure what you mean by this. The space $[0,1]$ is compact and Hausdorff, but its subspace $[0,1/2)$ is not closed.
"...every closed set under the topology $\mathcal{T}$ can be written as finite union of closed sets under the topology $\mathcal{T}'$."
Well if $E$ is $\mathcal{T}$-closed, then $E^c$ is $\mathcal{T}$-open, and thus by $\mathcal{T}\subseteq\mathcal{T}'$, we see that $E^c$ is $\mathcal{T}'$-open and consequently $E$ is $\mathcal{T}'$-closed. Thus every $\mathcal{T}$-closed set is $\mathcal{T}'$-closed. However how does this show that $\mathcal{T}\supseteq\mathcal{T}'$?
The easiest way to do this is to assume $\mathcal{T}\subseteq\mathcal{T}'$, and consider the identity map $f:(X,\mathcal{T}')\to(X,\mathcal{T})$ defined by $f(x)=x$. This is continuous by our assumption, and it's a bijection. Since it maps from a compact space into a Hausdorff space, we can conclude that it is a homeomorphism. Therefore $f$ maps open sets to open sets, meaning that if $U$ is $\mathcal{T}'$-open, then $U=f(U)$ is $\mathcal{T}$-open. Therefore $\mathcal{T}=\mathcal{T}'$.
If you aren't familiar with the theorem I used above, you should try proving it independently. It is tremendously useful and its proof relies on the same techniques one would employ to prove your problem without it. Here it is:
If $f:X\to Y$ is a continuous function from a compact space to a Hausdorff space, then $f$ is a closed map (i.e., it maps closed subsets of $X$ to closed subsets of $Y$). Moreover, if $f$ is a bijection, then $f$ is a homeomorphism.
I alluded that you can prove that $\mathcal{T}\subseteq\mathcal{T}'$ implies $\mathcal{T}=\mathcal{T}'$ without using this theorem, and as I suspect this is the route you intended, here's how one would do so.
Suppose $U$ is $\mathcal{T}'$-open. Then $U^c$ is $\mathcal{T}'$-closed. Since closed subsets of compact sets are compact, we know that $U^c$ is $\mathcal{T}'$-compact. As you pointed out, $\mathcal{T}'$-compactness implies $\mathcal{T}$-compactness, so $U^c$ is $\mathcal{T}$-compact. Since $\mathcal{T}$ is Hausdorff and compact subsets of Hausdorff spaces are closed, we deduce $U^c$ is $\mathcal{T}$-closed. Therefore $U$ is $\mathcal{T}$-open, which completes the proof.
I find that the following reformulation of this problem is more enlightening.
Let $\tau_C$, $\tau_H$, and $\tau$ be topologies on a set $X$ such that $(X,\tau_C)$ is compact and $(X,\tau_H)$ is Hausdorff.
(i) If $\tau\subseteq\tau_C$, then $(X,\tau)$ is compact.
(ii) If $\tau\supseteq\tau_H$, then $(X,\tau)$ is Hausdorff.
(iii) If $\tau_H \subseteq \tau_C$, then $\tau_C=\tau_H$.
Best Answer
There is no error in your proof. You do not need to know all closed subsets of $Y$, it suffices to know that compact subsets are closed.
By the way, your proof is the standard proof. I guess you found this proof as a solution to Munkres' exercise 6 in ยง26.