As $f$ is continous (for the induced topology) there is an open neighborhood of the origin, $U$ so that $|f (y)|\leq 1$ for $y\in U\cap Y$. Pick a balanced convex neighborhood $A$ so that $0\in A\subset U$ and construct the Minkowski functional $$ \mu_A(x)=\inf \\{ t>0 : t^{-1} x \in A\\}.$$ Then $\mu_A$ is a semi-norm on $X$ for which you may continue with Hahn-Banach in the usual way [see e.g. Rudin, Functional Analysis, Chap 1 for the Minkowski part]