I found this proof in some notes of mine. I'm sure it's not original but I don't know the source.
Let $\mathcal A$ be a family of closed subsets of $X$ with the finite intersection property. We need to show that $\bigcap_{A \in \mathcal A} A \ne \emptyset$.
We can suppose wlog that this family is closed under finite intersections, because augmenting $\mathcal A$ with all finite intersections of its elements preserves both the FIP and $\bigcap_{A \in \mathcal A} A $.
Consider
$\{q(A)\}_{A \in \mathcal A}$; this is a family of closed subsets of $Y$ since $q$ is a closed map. Show that this family has the finite intersection property. Since $Y$ is compact there exists a point $y \in \bigcap_{A \in \mathcal A} q(A)$.
Equivalently, $q^{-1}(y) \cap A \ne \emptyset$ for all $A \in \mathcal A$.
The family $\{q^{-1}(y) \cap A\}_{A \in \mathcal A}$ has the FIP because for $A_i \in \mathcal A$,
$$
(q^{-1}(y) \cap A_1) \cap \cdots \cap (q^{-1}(y) \cap A_k) = q^{-1}(y) \cap (A_1 \cap \cdots \cap A_k),
$$
$A_1 \cap \cdots \cap A_k \in \mathcal A$ by the assumption that $\mathcal A$ is closed under finite intersections, and we have just shown that $q^{-1}(y) \cap A \ne \emptyset$ for all $A \in \mathcal A$.
But the family $\{q^{-1}(y) \cap A\}_{A \in \mathcal A}$ is a family of closed subsets of the compact set
$q^{-1}(y)$. Hence
$\bigcap_{A \in \mathcal A} (q^{-1}(y) \cap A) \ne \emptyset$.
Notes: Continuity of $q$ is not used in the proof. However, the result is a lemma for the following proposition. Call a map $f: X \to Y$ between topological spaces \emph{proper} if the inverse image
of every compact subset of $Y$ is compact in $X$.
Proposition: Let $X$ and $Y$ be topological spaces with $Y$ Hausdorff. Let
$f: X \to Y$ be continuous and closed with each fiber $f^{-1}(y)$ compact in $X$. Then $f$ is proper.
Proof: Let $K$ be compact in $Y$. Then $K$ is closed since $Y$ is Hausdorff, and $f^{-1}(K)$ is closed in $X$ since $f$ is continuous. Let $q$ denote the restriction of $f$ to $f^{-1}(K)$. The hypotheses of the original question apply to $q$, and hence $f^{-1}(K)$ is compact.