The TOC in the GoTo menu is set by the reference in the Guide section of the OPF file.
For TOC, Start, or Cover, there should be entries like this:
<reference type="toc" title="Table of Contents" href="filename1.html"></reference>
<reference type="start" title="Beginning" href="filename2.html"></reference>
<reference type="cover-page" title="Cover" href="filename3.html"></reference>
You can use anchor references as well but be aware that, as of this writing, Calibre has a problem with anchors for TOC (anchors are fine for cover or start). Mobipocket Creator is fine with anchors in all cases.
If you ask Calibre for a TOC and it doesn't find a proper reference in the Guide (or one it's capable of using) then it makes its own at the back (or the front if set that way).
If you need to separate your TOC into its own file, remember to add a line for it in the Manifest and Spine sections.
Stay away from special characters in the filenames as some can throw Calibre off.