Followed by this, the second half of the quote:
"If we want the Arms Act to be repealed, if we want to learn the use of arms, here is a golden opportunity. If the middle classes render voluntary help to Government in the hour of its trial, distrust will disappear, and the ban on possessing arms will be withdrawn."

From the article: "The quote is in the context of war, not personal liberty."

Here's the article.

https://www.reddit.com/r/AskHistorians/comments/1h52r0/gandhi_supported_gun_rights_quote_of_his_being/

Context is everything, no?