The attack on Sunday (August 5) left seven people dead, including the shooter, The Times of India reports.
Speaking on Twitter, Amitabh Bachchan said he was "pained" and "shocked" following the news.
"What is happening in US?" he wrote. "Another shooting of innocents! And inside a temple, a gurdwara! Pained and shocked beyond words. Prayers for those affected."
Other Bollywood stars expressing their shock included Anupam Kher, who said: "Attack and killing of innocent people in a gurdwara in America is a sad and cowardly act. My heartfelt condolence to the families of victims."
Onir posted: "Anguished at the gurdwara shootout in US. When will race/religion/gender hate crime stop. Once again we see the worst aspect of human beings."
Pooja Bedi wrote: "Shocked and saddened by the shootout at Milwaukee gurdwara! Strength to victims' families. I hope his sentencing is severe and swifter than Kasab's!"
Vishal Dadlani commented: "What on earth is wrong with this world? Why are people just killing innocent people for no reason?"
US police have said they are treating the attack as "a domestic terrorist-type incident".