Facebook currently does not allow us to make our gender invisible from our profile.
The only “official” way to do it would be setting it via “Privacy Settings”.
The following shows how to truly make your gender invisible in Facebook:
// Do this on facebook.com/editprofile.php document.getElementById("sex").options.push(new Option("Hidden",0))
Select the “Hidden” option in the gender select box (I am …), and then Click “Save Changes”.