Let $X$ and $Y$ be topological spaces, and let $C(X,Y)$ be a topological function space of all continuous functions from $X$ to $Y$. Suppose there exists a function $g$ such that we do not know if it is continuous or not, but we want to make $g$ continuous. Of course, we do not know a priori whether $g$ belongs to $C(X,Y)$ or not, but we want to make $g$ an element of $C(X,Y)$.
Is there a way to artificially add $g$ to $C(X,Y)$ and make $g$ a continuous function?
The topologies on $X$ and $Y$ are given and so it's completely determined if any $f: X \to Y$ is continuous or not. So as a set $C(X,Y)$ is fixed. So the simple answer is no.
But, if you enlarge the topology on $X$, more functions can be continuous, so that $C(X,Y)$ is possibly larger (but it's not the same space anymore, because it depends on the given topologies on $X$ and $Y$).
Given any topology $\mathcal{T}_X$ and $g: X \to Y$ we can give define a topology $\mathcal{T}(g)$ with subbase $$\mathcal{T} \cup \{g^{-1}[O]: O \in \mathcal{T}_Y\}$$ to get a minimal topology that extends the one on $X$ and makes $g$ continuous as a map $(X, \mathcal{T}(g)) \to (Y, \mathcal{T}_Y)$ so that the new $C(X,Y)$ contains the old one and also $g$.
It might also possible to shrink the topology on $Y$ to get a similar effect.