Let me try this:

Running

I saw a running deer in the meadow behind my house.

The deer is running so the running is a participle.

I entered the third running of the Dinwiddie marathon, finishing in 17 hours 35 minutes 23.86 seconds, a personal best.

Running is used as a noun, so it is a gerund.

They gave me a third-running T-shirt anyway.

The T-shirt is not running. Running is part of an adjectival noun phrase. It is still a gerund.