Show that the path components $\pi_0$ of $X = U \cup V$ form a pushout diagram. 
By the definition, I'd need to show that:
$\bullet$ the diagram commutes, and
$\bullet$ if $Z$ is a space and if $F': \pi_0(U) \to Z$ and $G': \pi_0(V) \to Z$ are maps such that 
$$
\require{AMScd}
\begin{CD}
\pi_0( U \cap V) @>{f}>> \pi_0(V)\\
@V{g}VV @VV{G'}V\\
\pi_0(U) @>{F'}>> Z
\end{CD}
$$
commutes, then there exists a unique map $h: \pi_0( U \cup V) \to Z $ such that $F'=h\circ F$ and $G'=h\circ G$.
For the first property, my idea is to specify the maps in the original diagram to be those that send the elements to their respective path components. But I don't see how to go about showing the second property.

 A: I will use the same names and notation as in your question. As was already pointed out in the comments, $Z$ would just be a normal set since we are considering a pushout in the category of sets.
For the first part, to see that the diagram commutes, it is helpful to make precise what the maps do. You have the right idea: when we have an inclusion $A \subseteq B$ of topological spaces, then any path component $C \subseteq A$ will be contained in a unique (possibly larger) path component $C' \subseteq B$ (actually, this is even true when we replace the inclusion with any continuous function, but we won't need that here). This is how the maps $f$, $g$, $F$ and $G$ are defined. In other words, both $Gf$ and $Fg$ are just taking a path component in $U \cap V$ to the unique path component in $U \cup V$ containing it. There are thus the same, and so the diagram commutes.
For the second part there is some kind of standard recipe to follow here. It goes roughly as follows:


*

*Suppose that a function like $h$ exists.

*Use the commutativity of the diagram (i.e. $F' = hF$ and $G' = hG$ and so on) to determine how $h$ must be defined.

*Check that the definition that we found in step 2 actually gives a well-defined map.


Then you are done. Uniqueness follows from step 2 as well: every map that would make everything commute would have to be defined that way.
Note that if you already know how pushouts are calculated in the category of sets, you might be able to take some shortcuts. For example (as suggested in the comments), by constructing a bijection from $\pi_0(U \cup V)$ to this pushout and showing that everything commutes. However, if you do not know how pushouts of sets are calculated then that approach does not help understanding anything. Also, this method works in a lot of categories (e.g. try using it to construct pushouts or products in the category of topological spaces), so it is a nice trick to know.
So, let's try this. Let $C \in \pi_0(U \cup V)$ be some path component in $U \cup V$, what would $h(C)$ need to be? We distinguish two cases:


*

*$C \cap U \neq \emptyset$, so $C = F(C_U)$ for some $C_U \in \pi_0(U)$. Then we must have $h(C) = hF(C_U) = F'(C_U)$.

*$C \cap V \neq \emptyset$, so $C = G(C_V)$ for some $C_V \in \pi_0(V)$. Then we must have $h(C) = hG(C_V) = G'(C_V)$.


This defines a value for $h$ for all possible $C \in \pi_0(U \cup V)$, but is this well-defined? That is, we could still be defining multiple values for $h(C)$. There are two things we have to check in our definition of $h(C)$.


*

*What if $C \cap U \neq \emptyset$ and $C \cap V \neq \emptyset$?

*What if there are distinct $C_U, C_U' \in \pi_0(U)$ such that $C = F(C_U) = F(C_U')$?


Checking this is a bit tedious, and not very insightful if I spell it out here. So I leave the details to you. What you essentially want to do is define $\sim$ to be the smallest equivalence relation on $\pi_0(U) \amalg \pi_0(V)$ such that $C_U \sim C_V$ (for $C_U \in \pi_0(U)$ and $C_V \in \pi_0(V)$) when $C_U \cap C_V \neq \emptyset$ (so there is $C_{U \cap V} \in \pi_0(C \cap V)$ such that $f(C_{U \cap V}) = C_V$ and $g(C_{U \cap V}) = C_U$). Here you will need that $U$ and $V$ are open in $X$ at some point.
