By their case endings, and, sometimes, by a word stress, that is:
- words ending by -ий; -ый or -ой could be either participles or adjectives.
An implication of a transitive action required for the word to be a participle is usually expressed by a communicative ellipsis (so-called 'zero communication').
1.1. When preceding by -н(н)- - that is, in words like --нный (сделанный, отвеченный, приобретённый, купленный) they are, at 94% probability Past Tense Participles (Massculine Grammatical Gender). The exeptions are words like стеклянный, оловянный, деревянный, сонный, сезонный, странный.
1.2. A word ending in -ный is most likely to be an Adjective (жареный, мраморный, раненый, купленый).
1.3. A word ending in -н(н)ий could be a Masculin Adjective and nothing else: синий, ранний, зимний.
1.4. As for form -н(н)ой, there is a 93% probability that this is either Genitive or Instrumental Case of the same participle/adjective type as above in 1.1.-1.2 (save 1.3): стеклянной, оловянной, деревянной, сонной, сезонной, странной, жареной, мраморной, раненой.
Judging by the fact that persons speaking Russian as their first native language are more prone to use Genitive whenever it's possible (and sometime even when it's impossible) when they learn a language with a Genitive-like case within its case system, such a form is more likely to be a Feminine Genitive.
2. The Russian passive participles do differ by their grammatical genders, whilest the active participles (I suppose this is what you call 'Gerund') don't.
2.1. A word ending by -яя is 93% likely to be a 'Gerund' from a -ять-/ -ить- ending verbs ( меняя, цепляя, примеряя, примиряя, извиняя, обвиняя ), but there is also a possibility that it could be a Feminine Adjective of the abovementioned 1.3 type: синяя, ранняя, зимняя.
2.1. A word ending by -ая could be either a 'Gerund' form of a -ать- ending verb ( думая, зная, отвечая ) or a Feminine Nominative Adjective / Participle: adjectives крупная, купленая, жареная, мраморная, раненая VS participles сделанный, отвеченный, приобретённый, купленный.
2.1.1. When preceded by -нн-, it's usually a participle: сделанная, отвеченная, приобретённая, купленная.
2.1.2. When preceded by -н-, it's usually an adjective: жареная, раненая, мраморная, купленая.
2.1.3. The difference between a 'Gerund' and a 'Feminine Participle' is most frequently stated by presence / absence of -н(н)-. Thus, words like продуманная, признанная, отвеченная, купленная, приобретённая, сделанная are 'Participles' while words like думая, зная, отвечая, покупая, приобретая, делая are not.
2.2. Very seldom it could be a feminine loanword from Sanskrit (e. g.самАя - not to be confused with a feminine form сАмая of superlative adjective самый, sometimes also spelled самайя).
2.3. A word ending by -ея is either a 'Gerund' from a -еть- ending word (смея, белея, зверея) or a feminine noun/adjective (змеЯ, ворожея, камея) , or an Accusative form of a Single Masculine Animate Noun (змЕя, чародея, злодея). In the latter case, it is normally preceded by a transitive verb (or by an ellyptic context within a zero-communication structure).
2.4. A word ending in -ив is most likely to be an Active Participle of a Past Tense from an *-ить-***ending verb: ***ответив, уложив.*
2.5. A word ending by -ев could be, in order of probability, either an Active Participle of the same type (посмев, забелев, озверев) or a Masculine Noun (лев, зев), or a short form of a masculine adjective (левый; in this case it is usually not followed by a noun).
2.6. Last, but not least, an -ав - ending word is either a masculine nominative for a noun from a semi-archaic stock ending in -глав (Триглав, псоглав, златоглав, etc. or an adverb стремглав) or, again and most likely, a Past Tense PArticiple from an -ать-ending verb: подумав, признав, сделав, сказав.
NB: the letter Ё ё is rarely used in modern Russian writing, so the words приобретённый, приобретённая could be spelled as приобретенный, приобретенная.