The Bollywood star died in a hospital in the western city of Mumbai, his agency said.
In 2018, the actor posted on Twitter to say that he had been diagnosed with an endocrine tumour, a rare illness affecting cells that release hormones into the bloodstream.
He later underwent treatment in a London hospital and recovered well enough to shoot Angrezi Medium, the film which would turn out to be his last.
It was due to be released last month but was cut short because of the coronavirus pandemic.
In a statement, a spokesperson said: “‘I trust, I have surrendered’; These were some of the many words that Irrfan expressed in a heartfelt note he wrote in 2018 opening up about his fight with cancer. And a man of few words and an actor of silent expressions with his deep eyes and his memorable actions on screen.
“It’s saddening that this day, we have to bring forward the news of him passing away. Irrfan was a strong soul, someone who fought till the very end and always inspired everyone who came close to him.
“After having been struck by lightning in 2018 with the news of a rare cancer, he took life soon after as it came and he fought the many battles that came with it. Surrounded by his love, his family for whom he most cared about, he left for heaven abode, leaving behind truly a legacy of his own.
“We all pray and hope that he is at peace. And to resonate and part with his words he had said, ‘As if I was tasting life for the first time, the magical side of it.’”
Irrfan made his screen debut in the Academy Award-nominated 1988 drama Salaam Bombay!, a tale of Mumbai’s street children.
His breakthrough role came in 2002’s The Warrior, which was selected for the prestigious San Sebastian film festival and won a Bafta for Best British Film.
He went on to have success in mainstream Indian films, including Maqbool, an adaptation of Shakespeare’s Macbeth set in the Mumbai underworld.
More Bollywood roles followed, such as Rog and the musical Life In A... Metro.
He won a number of domestic film awards in India, including a 2012 Indian National Film Award for Best Actor for his performance in Paan Singh Tomar, a compelling tale of a seven-time national champion athlete who quit India’s armed forces to rule the Chambal ravines in central India.
The actor also received an Independent Spirit Award for Supporting Actor in the 2006 Indian-American drama The Namesake, and a Viewers’ Choice award at Cannes in 2013 for his role in Indian romantic drama The Lunchbox.
Irrfan was best known to English-speaking audiences as the police inspector in Slumdog Millionaire, which went on to win eight Oscars.
He also starred in big budget Hollywood productions including The Amazing Spider-Man (2012), Jurassic World (2015) and Inferno (2016).
In 2012 he played the adult version of the lead character in Ang Lee’s Oscar-winning Life of Pi.
Among the first stars to pay tribute to the actor were Priyanka Chopra and Shilpa Shetty...
Irrfan is survived by his wife Sutapa Sikdar, and sons Babil and Ayan.