Dear Tali G,
I agree with Bruce
It is the �ing� form, which can be used as a Progressive verb, (He is listening to the radio); an adjective, (The teacher set a listening exercise); an adverb, (He walked around listening): or a noun, (Listening to loud noises damages the ear-drums).
In some circumstances grammarians dislike using the terms Present Participle and Gerund, because they can mislead the student, so they use The �ing� Form.
Dalia Morsy has given a good explanation.
In this instance, the �ing form is used as a noun.
"After carefully listening to both sides of the story, he came to a decision".
This sentence is equivalent to:
�After a careful listening to both sides of the story, he came to a decision�.
�After his careful listening to both sides of the story, he came to a decision�.
�After the action of carefully listening to both sides of the story, he came to a decision�.
The following is not good English, but it illustrates the �noun� aspect of the clause.
�After an attentive �listen� to both sides of the story, he came to a decision�.
I hope that this helps.
Les