The Scottish Government said the money would help vulnerable people affected by imprisonment access housing, health and welfare services.
The centres also aim to cut re-offending by encouraging family contact.
About 27,000 children are affected by a parent going to prison each year, around double the number affected by divorce.
• READ MORE: In detail: Scotland’s prison population
Maintaining close contact with family has been shown to reduce the risk of re-offending by up to six times but almost half of prisoners lose touch when they are jailed.
Justice Secretary Michael Matheson said: “The main focus of prison visitor centres is the family rather than the prisoner.
“These services are vital for helping them deal with the issues they face as a result of their family member’s imprisonment, as well as helping to break the cycle of offending.
“Evidence shows that offering prisoners meaningful contact with their families can have a direct impact on reducing the risk of re-offending by up to six times.
“Ranging from emotional support to addressing problems in housing, finance, child welfare and domestic abuse, prison visitor centres can support families for the duration of a prison sentence as well as improving the prospects reintegrating back into the community.”
• READ MORE: Insight: Scottish prisons think outside the box
There are currently centres at Edinburgh, Addiewell, Perth, Polmont, Grampian, Barlinnie and Cornton Vale prisons, run by third-sector organisations alongside the Scottish Prison Service.
The funding will help develop new services at prisons which do not currently have visitor centres.
Welcoming the announcement, Ewan Aitken, chief executive of Cyrenians and chair of the National Prison Visitors Centre steering group, said: “We know the support provided by prison visitor centres change families’ lives and often the post-imprisonment choices made by the person who has served a sentence.
“This money will help many more families affected by imprisonment journey to a better place for themselves and their relative serving a sentence.”