Yes, gaslighting is an attempt to make people doubt their sanity, and it is implied that they were previously sane, or at least had a correct understanding of a given situation. It's not where someone tries to convince someone else that they are insane, or incorrect, when they really are.
In the movie ("Gaslight") that started this meaning of the word, the husband would lower the gas pressure, making the house lights dim and when she told him about it he denied that anything had happened, suggesting it was all in her mind. She was of course quite correct that the lights had dimmed.