Based on the OPs comment it seems that he is satisfied with what he was told in the comments. I'll summarize it here, so that this question does not remain unanswered - see meta. (I'm posting it as CW, so feel free to improve it; or post a new answer if something is missing here.)
An important point pointed out in Chris Eagle's comment is the fact, that the topology on $(0,2]$ given by the metric $d(x,y)=|x-y|$ is the same as the subspace topology induced by the usual topology on $\mathbb R$, see e.g. this question: Long proof of equivalence of subspace and metric topology
By definition of subspace topology: Suppose that $X$ is a subspace of $(Y,\tau)$. A subset of $X$ is open in the subspace topology if and only if it is the intersection of $X$ with an open set in $(Y,\tau)$. From this we can show easily that a subset of $X$ is closed in the subspace topology if and only if it is an intersection of a closed subset of $Y$ with $X$.
A detailed proof can be found at proofwiki: Closed Sets in Topological
From the above we now see that $A=[0,1]\cap (0,2]$ is an intersection of a set $[0,1]$, which is closed in $\mathbb R$, with the subspace $(0,2]$. Hence it is closed in the subspace topology.