One really important thing to recognize is that the Indian Independence Movement was a dynamic and evolving movement which took place over many decades, and that Gandhi's own views on violence and non-violence changed as time went on, and were influenced by the actions of people like Bhagat Singh and organizations like the Hindustan Socialist Republican Army. So its not as easy to create a clean separation between "Gandhi the pacifist" and "Bhagat Singh the militant", as is common.
I think the single best book to understand this is Francis G. Hutchins' India's Revolution: Gandhi and the Quit India Movement. The basic thesis of the book is that India won its Independence through violent insurrection and the growing push toward mass revolutionary war. The evidence that Hutchins' gives for this is the fact that the elites of the British Raj were fully determined to hold on to India after WW2, and passed many laws and regulations in the late '30s and early '40s to curb the reforms toward independence that had been passed during the '20s and early '30s that devolved more power to indigenous state governments, away from the central British-controlled government of India.
This reversal of previous British policy radicalized the leaders of the Indian National Congress, and in the context of World War 2, even Gandhi started becoming more accepting of violence as a legitimate means of political/social change. A large part of this was the threat of Japanese invasion of India, and the question of what Indians ought to do if such an invasion occurred. Gandhi preferred a mass, non-violent resistance to such a state of affairs--but also decided that he could not fault people if they decided to take violent action against them. But the result of such a stance toward the Japanese also radicalized his views on the proper way to resist the British--why would violence be acceptable toward the Japanese, and not the British, if both empires were illegitimate occupiers of South Asia?
This lead to Gandhi arguing that while non-violence was the highest form of struggle, taking violent action was better than doing nothing and passively being victimized and exploited. This laid the groundwork for the INC's plans for the Quit India Movement, which was hyped up a lot as being the final struggle against the British, and which called on all Indians to give the movement their all, as well as to feel free to use their own morals and judgement in how to best resist the British. This rhetoric (which was a significant escalation over previous movements), combined with the fact that the entire INC leadership was arrested after the August 8th declaration of the launch of the movement, meant that INC rank-and-file members felt like they had the moral authority to escalate into a mass violent insurrection.
And it was a very explosive rebellion; you can see the statistics of the casualties, property damage, and types of attacks that took place during the rebellion. Mobs of thousands burned down government buildings, destroyed railroad stations and post offices, tore down telegram poles, and clashed with police. After troops were deployed and the street protests and violence died down, rebels took to bomb attacks and guerrilla attacks against British infrastructure and officials, killing people in their villas and bombing police stations. All in all, British authority completely collapsed in large swathes of the country, and in some places like Midnapur, Bengal, authority was never fully restored.
The violence of this movement was arguably enhanced also by the existence of the Indian National Army, lead by Subhas Chandra Bose and funded by the Japanese, which was fighting against the British Army through South-East Asia in a more traditional military war. Bose regularly broadcast propaganda via radio into India, and the rebels of the Quit India Movement broadcast this messages and helped people obtain smuggled radio systems to tune in. So yes, Bose and the INC, while not directly succeeded in their military conflict, definitely contributed to the atmosphere of revolution that was taking over India at the time.
After the movement went past its climax and was seemingly repressed in most parts of the country, Hutchins documents how the elites of the British Raj had completely lost their will to try to re-impose their authority and act to maintain hegemony in the postwar period. In the Viceroy's mind:
Before the Quit India movement, his concern had been whether Parliament would back him up. Now, the viceroy’s chief concern was that the cabinet and the British public opinion in general would not fully grasp the seriousness of his situation and the difficulty he would face in merely holding on to power, let alone undertaking new initiatives (Hutchins 1973: 285).
The unrest also continued through 1945 and 1946, especially during the Royal Indian Navy Mutiny, during which thousands of Indian sailors mutinied and lead violent street protests in major coastal cities, torching government buildings and attacking officials.
So yes, ultimately I think it is definitely clear that violence had a key, if not critical, role to play in securing India's independence. Less clear, however, is whether one can easily and cleanly distinguish Gandhi as purely a pacifist; by the '40s, Gandhi did not have as much of a stern view on violence as he did when he and the movement was younger.