It's really tricky to know if you're not a fluent speaker. If the word has an indefinite article, it's easy to know (ei - feminine, en - masculine, et - neuter). In Norwegian we don't have "the", so instead we add to the ending of the word, but this is only in singular form (-a is feminine, -en is masculine, -et is neuter).
Figuring out what gender the noun is, without any of the hints above, can be very difficult. I suggest you try to say it out loud with the different endings and see what sounds best, this is what native Norwegians do when in doubt.
It isn't actually necessary to use feminine. It's becoming more and more common to only use masculine and neuter, so common that our teachers allow it. In that case, all feminine words are masculine, so you only have to distinguish between masculine and neuter.
Good luck!