It's hard to say what you are doing wrong since we can't see the pattern. It's copyrighted so you can post just the confusing part to help us out.
To cast on in the middle you can usually just use backward loop
cast on. Or you can use the cable cast on
which is a little tighter.
It's not uncommon to have a gap in situations like this. If you have started a new skein of yarn there you can use the tail to close it up.