In English the grammatical term gerund is used only for an -ING form which is employed as a noun. When an -ING form is used as an adjective or as a component of progressive verb construction it is called a participle.
Consequently, the way to tell what you should call a specific instance of an -ING form is to determine what role it plays in the sentence.
In the case at hand, slamming ... is a clause which describes what the subject she did. It is not the subject or object of another verb, it is not marked with a determiner or any other adjective. It has to be a participle.
In the same context you might use slamming as a gerund this way:
She stormed out; slamming the door so hard that the mirror fell off the wall was her final comment on the discussion.
In this case, *slamming ... * is the subject of the verb was; slamming is a gerund.
It is usually pretty easy to figure out whether an -ING form is a participle or a gerund; but there is one tricky sort of construction. These require a subtler analysis.
running water
running shoes
In both of these, running is used to modify the following noun; but in the first, running is a participle, while in the second it is a gerund.
This may be easier to understand if I introduce a new technical term. The -ING form is traditionally called the present participle, to distinguish it from the past participle, the -ED form; but it is just as proper, and sometimes more useful to call it an active participle: a form which designates what the noun it modifies does, as opposed to the passive participle, which designates what is done to the noun it modifies.
So to discern whether an -ING form is a participle or a gerund you must ask yourself whether the action the form names is performed by the noun which it modifies.
- In running water it is in fact the water which runs, so running is a participle
- in running shoes, however, the shoes do not run; rather, they are used for running, just as tennis shoes are used for playing tennis or football shoes are used for playing soccer. In this case, running is a verb used as a noun—a gerund—which in turn is used attributively, as an adjective.
Isn’t English fun?!
Why does it matter what label you affix to an -ing word? It does its job perfectly well no matter how sweet smelleth the rose by any other name. – tchrist – 2013-02-10T19:57:04.273
Yes @tchrist, but a rose must remain with the sun and the rain or its lovely promise won't come true. – None – 2013-02-10T20:28:40.020
Untrue! Stat rosa pristina nomine, nomina nuda tenemus. – tchrist – 2013-02-10T20:29:46.793
@tchrist, may be; but don't forget Non sum propheta et non sum filius prophetae. – None – 2013-02-10T20:33:17.623
As side note, what in Italian is called gerundio, it is not called gerund in English. A gerund is a form derived from a verb that functions as a noun; that definition matches what in Italian is defined as participio ("forma nominale del verbo, usata generalmente con valore di aggettivo o di sostantivo"). – kiamlaluno – 2013-02-11T14:04:12.937