Gandhi was in fact a Lawyer. He was trained in law for over 20 years being very successful in South Africa before moving back to India. This helped him, as the mindset of a lawyer enabled him to deal with situations using words, rather then violence.
I hope this helps! :)