Union Minister Harsimrat Badal and Punjab Chief Minister Captain Amarinder Singh were also present with Modi at the gurdwara.
Later in the day, Modi is slated to inaugurate the Kartarpur Corridor in Gurdaspur district. The 4.7-kilometre-long route will connect Dera Baba Nanak shrine in Gurdaspur and Gurdwara Kartarpur Darbar Sahib in Pakistan.
Modi will today flag off the first batch of 500 Indian pilgrims, which includes former Prime Minister Manmohan Singh, Punjab Chief Minister Amarinder Singh, Union Minister Harsimrat Kaur Badal and her husband and SAD chief Sukhbir Badal and several ministers, MPs and MLAs from Punjab who will travel to Gurdwara Darbar Sahib through the Kartarpur Corridor.
Giani Harpreet Singh, the Jathedar of Akal Takht, will lead the Indian delegation as the religious leader.
The Prime Minister will also inaugurate passenger terminal building, also known as Integrated Check Post, where pilgrims will get clearance to travel through the corridor.
Meanwhile, the first 'jatha' of Sikh pilgrims from India has arrived at Pakistan through the Kartarpur Corridor.
On the other hand, Pakistan Prime Minister Imran Khan will also inaugurate the other side of the route on the same day, apart from other events that will be hosted to mark Guru Nanak Dev's birth anniversary.