Think of the noun and its gender as a married couple! You need to learn the gender of a noun at the same time as learning the noun itself. There are also some tricks to knowing whether a noun is 'der', 'die' or 'das'. The ending of a noun often gives us a clue about its gender. For example, nouns that end in '-keit' or '-heit' are generally feminine. 'Tätigkeit' or 'Fähigkeit' would therefore be 'die' -> die Tätigkeit and die Fähigkeit