Theres a reddit bad history post on gandhi, and its probably the gold standard for dealing with the new edge to Gandhi's history. (Learning about Gandhi is like peeling off alternating layers - hes a saint, no he isn't, oh he really is a saint).
IN essence, Gandhi grew up and discarded his racist views.
Do note that this portrayal deals specifically with this particular criticism which is popular today, and provides the (usually) missing context.
Heres the bad history post - https://www.reddit.com/r/badhistory/comments/3iiwxr/the_sexu...
But these romanticized portrayals of Gandhi often omit darker aspects of his persona like his racist quotes about Africans.