Martin, 38, from Fife, sustained serious injuries during the blaze at the former department store which started on Monday and was one of five firefighters taken to hospital during the city centre blaze.
The firefighter, who was based in Edinburgh, had been in a critical condition at the Royal Infirmary of Edinburgh since the blaze but Police Scotland said he died on Friday.
Mr Martin is the first Scottish firefighter to die while on duty since Ewan Williamson, who died after being injured at the Balmoral Bar in Edinburgh in 2009.
Ross Haggart, the Scottish Fire and Rescue Service’s interim chief officer, said he and his colleagues were “devastated” at Mr Martin’s death.
“I speak for the entire service when I say that we are all devastated by the loss of Barry and our thoughts remain with his family, friends and colleagues at this deeply distressing time,” he said.
“Both Barry’s family and the service have been overwhelmed with the messages of support we have received and we thank everyone for the time they have taken to share these.
“Barry’s family would also like to thank all the medical staff who have cared for him.”
At its height, 22 fire appliances were sent to the scene at Rose Street, with more than 100 firefighters battling the blaze, which was reported at about 11.30am.
Witnesses saw a soot-covered firefighter being helped from the building by colleagues.
In all, six emergency workers were taken to hospital, five firefighters and one police officer.
Two firefighters were treated for burns and a police officer and two firefighters for smoke inhalation and have since been discharged.
Superintendent David Robertson of Police Scotland said: “Our thoughts are with the family, friends and colleagues of Barry at this very difficult time.
“Our inquiries are ongoing to establish the full circumstances.”
Nicola Sturgeon described Mr Martin’s death in the line of duty as a “terrible tragedy”.
The First Minister tweeted: “This is dreadfully sad news.
“My deepest condolences go to Barry’s family, friends and colleagues.
“This is a terrible tragedy for all who loved him – but also a reminder of the selfless courage our firefighters demonstrate in the line of duty each and every day.”
The general secretary of the Fire Brigades Union paid tribute to Mr Martin.
Matt Wrack said: “Everyone in the Scottish and UK Fire and Rescue Service will be devastated by today’s events.
“Our hearts go out to Barry’s family, colleagues and friends, and to all those who mourn his loss.
“Barry was a dedicated firefighter and a well-loved member of the firefighting community.
“We are very proud that he was a member of our union.
“Like so many firefighters, he put himself at risk to save the lives of others.
“In due course, we will investigate the events that led to his death. Today, we are grieving for a colleague and a friend.”