First of all, we have to remember that the Spanish gerundio is a verbal form. Sometimes it is similar to the English gerund, but many times it is not. It cannot be a noun, the way it is in English. The verbal form in Spanish that behaves like a noun is the infinitive. So, in English you can say "I like dancing" where "dancing" is a gerund, which is a noun. Whereas in Spanish you have to say:
I like dancing =
CORRECTO: Me gusta bailar
INCORRECTO: Me gusta *bailando
The same occurs in these examples:
Walking is a good exercise = Pasear es un buen ejercicio
Do you mind me asking you? = ¿Puedo preguntarte?
The Spanish gerundio is normally used in the following two cases.
With the verb estar, it forms a estar + gerundio construction, like English Continious Tenses:
Mi madre está hablando – My mom is talking
Mi madre estaba hablando – My mom was talking
It can function as a copredicate expressing a secondary action that is simultaneous to the principal:
No hay que cruzar la calle leyendo el periódico = One shouldn’t cross a street while reading a newspaper
Me gusta leer escuchando música – I enjoy reading while listening to music
Note that in the last example we have translated reading as leer (an infinitivo).
The adjective usage of the English gerund should be expressed with a subordinate clause:
the screaming baby – el bebé que está llorando
Spanish gerund does not admit negation. We must use sin + infinitivo instead:
Habla mirándome – He speaks looking at me
Habla sin mirarme – He speaks without looking at me