He expressed condolences to the families of the deceased and sent prayers for the injured.
"Terror attack in Pakistan near Wagah border is shocking," Modi tweeted.
"I strongly condemn such a dastardly act of terrorism," he added.
At least 55 people, including 11 women and three security personnel, were killed and nearly 200 injured when a suicide attacker detonated a powerful bomb at Wagah in Pakistan today, minutes after the popular flag-lowering ceremony at the main Indo-Pak land border crossing.