A verb plus -ing form used in a nominalized sentence is a gerund. It's a verb. A nominalized sentence is a sentence given a form that lets it occupy the position of a NP, e.g. subject, direct object, object of a preposition. So, yes, subject position is okay.
A gerund is not a noun. It's a verb which, like other verbs, can take a direct object (provided the verb is transitive), can be modified by an adverb (but not an adjective), does not take an article.
Confusingly, there are also nominalized sentences with nouns that have been derived from verbs. The term for these is derived nominal. Your example "the analysis of data" is a derived nominal. "Analysis" here is a noun, not a verb. Notice that like other common nouns, and unlike verbs, it does take an article, but does not take a direct object (the logical object "data" has to be expressed as a prepositional phrase, because it can't be made a direct object).
Even more confusingly, there are -ing nouns derived from verbs that occur in nominalizations. For your examples, we could also get "The analyzing of data is difficult." Here, like "analysis", "analyzing" is a noun.
There are sometimes meaning differences between nominalizations with -ing, which can refer to facts, and nominalizations with derived nominals, which can refer to actions or the manner of some event or process.
Ronald Langacker gives an able and concise summary of the classical analysis of the two kinds of nominalizations here. McCawley adds some interesting analytic details (as usual) in The Syntactic Phenomena of English.