A holographic simulation of Gandhi was among the historical personality profiles studied by The Doctor in 2373, during his attempt to expand his personality subroutines. He discussed the function of sex with Lord Byron. In his opinion, males and females should not even look at each other with passion, which he felt was only useful to promote procreation. He recommended a cold bath to dispel such urges. (VOY: "Darkling")
He was listed in the script's cast simply as "Gandhi". For his appearance, the script noted the voice over of a "heavily accented Indian voice," adding the reveal of "Gandhi, in his easily recognizable clothing." It is further revealed that his commentary was, in fact, on 'an n.d. Starfleet Ensign' and the 'beautiful Holodeck Resort woman in a bathing suit' seen across the patio that the Ensign was attempting to charm.
According to the Star Trek Encyclopedia (4th ed., vol. 1, p. 296), the birth and death years of Mahatma Gandhi were 1869 and 1948, respectively. Furthermore, the authors wrote, "A native of the nation of India, Gandhi fought for political independence from the British government, but did so with a radical philosopy of nonviolence. Gandhi also strived to improve the quality of life for the lowest classes of society, preaching the benefits of manual labor and simple living."