As mentioned in the comments, it is a bit unusual to consider a "metric" which is allowed to take the value $\infty$, but we can work with a more general definition of "metric" as discussed in Metric assuming the value infinity.
This approach via the generalized metric $d$ gives us a topology on $Top^h(\mathbb{R},\mathbb{R})$. Moreover, it is easy to verify that the same topology is induced by the ordinary metric $d_1(f,g) = \min (1,d(f,g))$.
Assume that there exists a continuous map $u : I = [0,1] \to Top^h(\mathbb{R},\mathbb{R})$ such that $u(0) = id$ and $u(1) = -id$. Since $I$ is compact, $u$ is uniformly continuous and therefore we can find $n \in \mathbb N$ such that $d(u(t),u(s)) \le 1$ for $\lvert t - s \rvert \le 1/n$. This shows that
$$d(u(0),u(1)) \le \sum_{i=1}^n d\left(u\left(\frac{i-1}{n}\right), u\left(\frac{i}{n}\right)\right) \le n .$$
But clearly $d(id,-id) = \infty$, a contradiction.
A perhaps more natural way to topologize $Top^h(\mathbb{R},\mathbb{R})$ is to use the compact open topology (see freakish's comment). But let us take yet another topology on $Top^h(\mathbb{R},\mathbb{R})$ : The topology of pointwise convergence. A subbasis for this topology is given by the sets $M(x,U) = \{ f \in Top^h(\mathbb{R},\mathbb{R}) \mid f(x) \in U \}$, where $x \in \mathbb R$ and $U \subset \mathbb R$ is open. This topology is coarser then your metric topology and coarser than the compact-open topology. We shall show that there exists no continuous path from $id$ to $-id$ with respect to the topology of pointwise convergence, which is a much stronger result than that proved above.
Let us define
$$H_+ = \{f \in Top^h(\mathbb{R},\mathbb{R}) \mid f(1) > f(0) \} , \\
H_- = \{f \in Top^h(\mathbb{R},\mathbb{R}) \mid f(1) < f(0) \} .$$
These sets form a partition of $Top^h(\mathbb{R},\mathbb{R})$ into disjoint subsets.
The set $H_+$ is open: Let $f \in H_+$ which means $f(1) > f(0)$. Let $r = (f(1) - f(0))/2$. Then $f \in W = S(1, (f(1) - r,\infty)) \cap S(0, (-\infty, f(0) + r))$. The set $W$ is open in $Top^h(\mathbb{R},\mathbb{R})$ . For $g \in W$ we have $g(1) \in (f(1) - r,\infty)$ and $g(0) \in (-\infty, f(0) + r)$. This implies $g(1) > g(0)$, i.e. $g \in H_+$. Thus $f \in W \subset H_+$.
Similarly $H_-$ is open.
Now let $u : I \to Top^h(\mathbb{R},\mathbb{R})$ be a continuous path. The sets $I_\pm = u^{-1}(H_\pm)$ form a partition of $I$ into disjoint open subsets. Since $I$ is connected, one of $I_\pm$ must be empty and the other $= I$.
This shows that there is no continuous path connecting an element of $H_+$ with an element of $H_-$. But $id \in H_+$ and $-id \in H_-$.