Edited into something slightly more useful in light of the comments below.
A gerund is not a part of speech in that it is not a category on the level of noun, verb, determiner, preposition, etc. (Of course, you can ask: "What part of speech is that?" when pointing to a gerund, as you can with any word.)
There is a range of items that look gerund-like, and delineating this range is not easy. There are "gerunds", "participles" and, in some terminologies, "(de)verbal nouns" and so forth. The former two are considered forms of verbs. But classifying a given word ending in "-ing" as one or the other of these categories may depend mostly on its behaviour as a noun or verb in the context.
Here's one context that perhaps helps to delineate them:
I enjoyed his singing. (Noun.)
I enjoyed his beautiful singing. (Notice the use of an adjective.)
I enjoyed his singing that song. (Verb.)
I enjoyed his beautifully singing that song. (Notice the use of an adverb.)
And yet in subject position, it can effectively function as an NP again:
His singing was beautiful.
His singing that song was beautiful. (=the mere fact that he sang it was beautiful)
(Also) His singing of that song was beautiful. (=his singing itself was beautiful)
We propose different underlying structures to account for the different behaviour of the -ing form, but I would say it's difficult to parse at best and theoretically hazy at worst.
As has been pointed out below, sometimes this form is simply referred to as a "gerund-participle", and computer parsers treat it quite variably, from a V heading a VP to an N heading an NP to a "G" heading either one to, most perplexingly, a V heading an NP!
In any case, however, it's not a part of speech, but the term is used to refer to one or more verbal forms that behave like various parts of speech.