There is actually no Greek manuscript that explicitly states what the NIV implies in Matthew 7:11: "how much more will your Father in heaven give good gifts ...". The Greek simply contains the adjective "good" (αγαθα) by itself, which most versions translate as "good things". The NIV is one of the few versions that imputes a meaning of "good gifts" to the verse.
Furthermore, "Holy Spirit" in Luke 11:13 is not what appears in all manuscripts; there are some manuscripts which refer to "a good spirit" (πνεῦμα ἀγαθὸν) rather than "the Holy Spirit" (πνεῦμα ἅγιον), including one papyrus1 that dates back to the 3rd century.2 The oldest complete commentary on Luke, undertaken by Cyril of Alexandria in the late 4th/early 5th century, shows "good spirit" rather than "Holy Spirit" when it quotes this verse (see below). Metzger's Textual Commentary assigns πνεῦμα ἅγιον ("Holy Spirit") as the reading in Luke 11:13 to category "B", which signifies a high degree of, but not complete certainty. (The text used today by the Greek Orthodox Church contains "good spirit", not "Holy Spirit"). The two words are close in Greek - agatho for good, agio for holy - but they are not the same. It seems relevant to me also that there is no article "the" in the Greek text (as in "the Holy Spirit"), in any variant.
I think these are important points, because an exegesis of these verses that focuses on the Holy Spirit as a "good gift" may be getting away from what is actually in the text. It may be a useful and edifying topic, but it may not be addressing what is actually in these Scriptures.
Cyril explains the verse in Luke as follows:
And the same reasoning holds good of the serpent and fish, and the egg
and scorpion. If he ask a fish, you will grant it: but if he see a
serpent, and wish to seize it, you will hold back the child's hand. If
he want an egg, you will offer it at once, and encourage his desire
after things of this sort, that the infant may advance to riper age:
but if he see a scorpion creeping about, and run after it, imagining
it to be something pretty, and as being ignorant of the harm it can
do, you will, I suppose, of course stop him, and not let him be
injured by the noxious animal. When therefore He says, "You who
are evil;" by which He means, you whose mind is capable of being
influenced by evil, and not uniformly inclined to good like the God of
all; "you know how to give good gifts to your children: how much more
shall your heavenly Father give a good spirit to them that ask Him?
And by "a good spirit'. He means spiritual grace: for this in every
way is good, and if a man receive it, he will become most blessed, and
worthy of admiration.3
I think this interpretation also makes more sense, since the first time the Holy Spirit was received was when Christ breathed on the Apostles (John 20:22), and then not even fully until Pentecost (Acts 2).
Further, I think when both of these things are considered - (a) a more faithful translation of Matthew 7:11 ("good" or "good things" rather than "good gifts"); and (b) understanding Luke 11:13 to refer to a "good spirit" rather than the "Holy Spirit" - the verses are much more in harmony than they appear to be in the NIV translations.
An alternate translation that accords with the above points is provided in Laurent Cleenewerck's Eastern Orthodox Bible: New Testament:
If you then who are evil [still] know how to give good gifts to your children, how much more will your Father who is in heaven give
good [things] to those who ask him!
If you then, being evil, know how to give good gifts to your children, how much more will your heavenly Father give a good spirit
to those who ask him!
Having said all this, I think there are solid counterpoints. In addition to the manuscript weight, there are also Church Fathers who quote Luke 11:13 with the phrase "Holy Spirit" (e.g. Ambrose, Cyril of Jerusalem), so I wouldn't want to reject all other interpretations out of hand.
2 Nestle-Aland Greek-English New Testament (11th. ed.)
3 Commentary on the Gospel According to Luke, Sermon LXXIX