Dr Singh appealed to people to maintain calm and peace following the low-intensity blast which occurred near a temple in Uttar Pradesh's temple town on Tuesday evening.
"It is the most unfortunate incident. It was an attempt to weaken our resolve to fight the evil forces of terrorism and the terrorists will not succeed," he said soon after the incident.
"My heart goes out to those suffering families and we will provide succour to them," the prime minister said.
Earlier, he asked the home ministry for a detailed report on the incident.
Calling the Varanasi blast an attempt to disturb peace and harmony, Home Minister P Chidambaram on Tuesday night appealed to the people to remain calm saying security has been tightened all over the country.
He said in all 21 people, including two foreigners, have been injured in the blast for which terror outfit Indian Mujahideen has claimed responsibility.
The authenticity of the claim is being verified, the minister said.
"Government condemns the attempt to disturb the peace and harmony by a misguided group which appears to have planted a low-intensity device in one of the ghats in Varanasi," Chidambaram told PTI.
"My information is that 21 people, including two foreigners, were injured. The two foreigners received first aid in hospital and have left the hospital. Of the other 19, 15 are in one hospital and four in another hospital," Chidambaram said adding they were out of danger.
He said various media houses have received an email purported to be from the Indian Mujahideen. It is a five page document that refers to demolition of Babri Masjid, Jammu and Kashmir and other issues.
The authenticity of the email is being verified. The home minister said all states were put on alert many days ago.
The alert was reiterated on December 5 and the alert was reissued today. "I appeal to the people to maintain calm. Security arrangements have been made all over the country," he said.
Remembering the first time terror haunted Varanasi
IMAGES: Terror strikes Varanasi again
Varanasi blast: IM claims hand; no specific alerts