I want to try to analyze this without the onerous term "gerund". That's just a distraction, I think. I think what this is about is ambiguity resolution. Let's consider the 4 possibilities of article + preposition:
1 The Taming of the Shrew
2 Taming the Shrew
3 *The Taming the Shrew
4 ?Taming of the Shrew
1 and 2 sound fine but perhaps have subtly different meanings. 3 is right out. 4 is iffy but all right. The question here is, why does this situation obtain?
Look at 3, which I think we can all agree is ungrammatical. Here the word 'taming' must not be acting as a verb form. If it were a verb, then the transitivity of tame would allow 'the shrew' to be a direct object. But here, we know that 'taming' is not a verb because it has a determiner, the article 'the'. Determiners modify nominals. So a determiner with an -ing word means we are interpreting the -ing word as a noun.
[Det] [-ing word] => [-ing word] = [N]
But this means 3 must be of the form
[Det] [N] [Det] [N]
Which we don't know how to interpret as grammatical.
Now consider 1. This is straightforward:
[Det] [-ing word] [Prep] [Det] [N] => [Det] [N] [Prep] [Det] [N]
That is, a noun phrase modified by a prepositional phrase. Easy.
When there is no [Det], we by default interpret an -ing word as a verb.
[-ing word] => [V]
which means 2 is like:
[-ing word] [Det] [N] => [V] [Det] [N]
which we interpret as a verb and its direct object, based on default SVO word order assumptions.
4 is interesting since we could have 2 paths for resolving the ambiguity.
[-ing Word] [Prep] [Det] [N] => [V] [Prep] [Det] [N]
which could be just a V with a prepositional object. Except transitive tame takes a plain DO (direct object), not a prepositional object, so it's not quite right. But:
[-ing Word] [Prep] [Det] [N] => [N] [Prep] [Det] [N]
could just be a noun phrase modified by a prepositional phrase again. The first noun just doesn't happen to have a determiner, which is ok. So 4 is easy to interpret.
So I think, again avoiding loaded terms like gerund, that in English we want to be able to assign N or V categories to words, and then semantic roles like DO based on those categories. When we can't do so unambiguously, we call the sentences ungrammatical.