The incoming Moderator of the General Assembly of the Church of Scotland has described the issue as "a damning indictment on modern society", given the UK has one of the wealthiest economies in the world.
More than 35,000 homeless applications were made to local authorities in 2014-15, according to the housing and homelessness charity, Shelter Scotland.
Dr Barr is urging the Scottish Government to make good on a promise to build at least 50,000 more affordable homes in the next five years.
He said: "Homelessness ...is a disgrace and should not happen in the UK, which is the fifth richest economy in the world.
"We worry about health and education, and one of the best ways to improve standards is to ensure that people are properly and safely accommodated."
The 62-year-old has been visiting Fresh Start (pictured above), an Edinburgh-based charity he established for homeless people, which also offers food and classes on cookery, budgeting, and growing fruit and vegetable.
Minister of Cramond Kirk in Edinburgh since 1993, Dr Barr was prompted to found Fresh Start seven years ago after meeting a former-homeless man who could not afford to buy basic utensils for a flat he was allocated.
Dr Barr went on to say: "Meeting this chap was a lightbulb moment and I realised we had to do something really practical. He needed help to turn that flat into a home because what he had in the street beside him was all that he had in the world."
He added: "Tackling the obscenity of homelessness must be a key priority for the Scottish and UK governments because if you believe in a progressive, modern Scotland you must make sure that people are properly housed.
"The government in Scotland must keep its promises and deliver on pledges to build more affordable homes."