The Steenrod-approximation theorem states mild conditions under which an extension of a smooth function on a closed subset by a continuous function may itself be improved to an extension by a smooth function.
This is a smooth enhancement of the Tietze extension theorem.
Let $X$ be a finite dimensional connected smooth manifold with corners. Let $\pi : E \to X$ be a locally trivial smooth bundle with a locally convex manifold $N$ as typical fiber and $\sigma : X \to E$ a continuous section.
If $L \subset X$ is a closed subset and $U \subset X$ is an open subset such that $\sigma$ is smooth in a neighbourhood of $L \setminus U$, then:
for each open neighbourhood $O$ of $\sigma(X)$ in $E$ there exists a section $\tau : X \to O$
which is smooth in a neighbourhood of $L$;
and which equals $\sigma$ on $X \setminus U$;
there exists a homotopy $F : [0,1] \times X \to O$ between $\sigma$ and $\tau$ such that
each $F(t,-)$ is a section of $\pi$;
for $(t,x) \in [0,1] \times (X \setminus U)$ we have $F(t,x) = \sigma(x) = \tau(x)$.
See (Wockel)
Let $f,g : Z \to Y$ be two smooth functions between smooth manifolds. Let $\eta : Z \times [0,1] \to Y$ be a continuous delayed homotopy between them, constant in a neighbourhood $Z \times ([0,\epsilon) \coprod (1-\epsilon,1])$.
Then there exists also smooth homotopy between $f$ and $g$ which is itself continuously homotopic to $\eta$.
To apply the generalized Steenrod theorem with the notation as stated there, make the following identifications
set $X := Z \times [0,1]$;
set $N = Y$;
let $E = Z \times [0,1] \times Y$ be the trivial $Z$-bundle over $X$
(so that sections of $E$ are equivalently functions $Z \times[0,1] \to Y$)
let $(\sigma : X \to E) := (\eta : Z \times [0,1] \to Y)$ be the given continuous homotopy;
set $L := Z \times [0,1]$;
let $U := Z \times (0,1)$.
Then because by assumption $\eta$ is a continuous delayed homotopy between smooth functions, it follows that $\sigma$ is smooth in a neighbourhood $Z \times ([0,\epsilon) \coprod (1-\epsilon,1])$ of $L$.
So the theorem applies and provides a smooth homotopy
which moroever is itself (continuously) homotopic to $\eta$ via some continuous $F : [0,1] \times [0,1] \times Z \to Y$.