I assume you are talking about equisingular/topologically equivalent singularities (if you are talking about the analytical types, then the codimension is even higher). In that case, the relation can be computed from the embedded resolution of the singularity, as follows. This resolution consists in blowing up the point, and as long as the obtained curve plus the exceptional divisor does not have Normal Crossings, keep blowing up the points at which this fails. For each point $p$ that has to be blown up, let $m_p$ be the multiplicity of the curve at $p$; and let $f$ be the total number of non-satellite points to be blown up (a point is satellite if it is the intersection point of two exceptional components of previous blowups). Then $k=g+\sum m_p-f-1$ [Edit: because both $k$ and $g$ can be computed from the resolution; see Kleiman-Piene, Enumerating singular curves on surfaces, in "Algebraic geometry: Hirzebruch 70" and references therein. In Kleiman-Piene, $k$ is called "cod" and $g$ is called $\delta$.]
Edit: as soon as the singularity has multiplicity $\ge 4$, $\sum m_p-f-1\ge 4-1-1$ and your lower bound follows. If it has multiplicity 3 and at least one more point in the resolution has multiplicity 3, then $\sum m_p-f-1\ge 6-2-1$. All remaining types are A, D or E and hence covered by your argument so the upper bound as you claimed.
If you want a lower bound of the type $g\ge k- constant$ (I had not noticed this part of the question, sorry) then the formula tells you it is impossible. For instance, the ordinary singular point of multiplicity m has $k=g+m-2$ and $m$ can be arbitrarily large. On the other hand, since both $k$ and $g$ grow quadratically with $m$, you can surely get bounds of the form $g \ge k \times constant$ (and pick the constant arbitrarily close to 1 by restricting to large $k$). (If you are interested in the codimension of the equianalytic stratum, this argument does not work, but I still believe a lower bound of this sort may exist).