Oftentimes, it's indeterminable through anything but practice. This is one of the cases where there actually is a strict rule in place, however. Regardless of whether or not the base word uses 'de', diminutives ALWAYS use 'het'. For example:
de deur - het deurtje | de muis - het muisje | het huis - het huisje
This seems to be a pretty good guide on when to use het vs de: http://www.taalthuis.com/index.php?option=com_content&view=article&id=13&Itemid=169
Meisje is in the neuter singular. Just like in German, the word for girl is neuter instead of feminine because it's actually a diminuitive. I only know the origin in German, but I assume Dutch is pretty much the same:
In German "Mädchen" derives from "Magd" (meaning maiden). It's a diminuitive (smaller-making form, I think Spanish has one too... -ito/a I think), which in both German and Dutch are always neuter.