Probably much of both. There has always been a national conciousness throughout India that came to the fore more than once during British rule. Gandhi re-awakened this consiousness with his sincere beliefs in democracy, religious and ethnic equality, and rejection of the caste system. Growing support resulted in tens of millions joining the Congress party that eventually took over on independence.
But there is no doubt that many in the Congress were utterly manipulative, and worked purely for their own ends.