As far as I can tell, what genre your work is published in is usually up to the publisher, as a tool for bookstores and other retailers to label and categorize your work.
I've seen a lot of arguments about particular books being labeled in a specific genre and readers not really considering it to fit there. An example would be "The Sparrow" by Mary Doria Russel, which was published as 'sci-fi' and usually found in that section, but I've heard many impassioned arguments for it to be placed in fiction/literary fiction.
Fantasy/Sci-fi seem to have a lot of books that are both, so you tend to see books with both labels on them.
As for submitting your work publishers, it might be best to see what books they've labeled as what genres in the past. That might give you a better idea whether or not they'll consider your work as part of the genre that you intend it to be, or if they might consider it something else. (For example, if they consider your Steampunk novel to be sci-fi, or fantasy, or speculative fiction, or historical AU.)