The word guru literally means teacher in Hindi and Sanskrit, and is a title of reverance used to address spiritual teachers or personal mentors in Hinduism. In this sense, guru is used more or less interchangably with satguru (literally: teacher of truth). Compare also Swami.
The word has acquired a negative connotation in western countries, likely due to the prominence of several self-proclaimed "gurus" in the US during the 1960s and 1970s "New Age" movement (see e.g. Osho), who used Hindu terminology without having much else in common with mainstream Hinduism.
The term guru has since passed into wider metaphorical use. In hacker culture, Guru is an expert. Implies not only wizard but also a history of being a knowledge resource for others. Less often, used (with a qualifer) for other experts on other systems, as in VMS guru. (The definition is from Jargon file.)