Prime Minister Narendra Modi, who is on a 7-hour-long visit to Varanasi, visited the Kashi Vishwanath temple and offered prayers.