Last November, Ballance admitted he was culpable for some of the offensive terms Rafiq was subjected to during his two spells at Headingley between 2008 and 2018, using a racial slur he said he regretted.
The pair had a face-to-face meeting in London this week and after accepting the apology, Rafiq hopes Ballance can now become "part of the solution" in cricket's fight against racism.
Ballance, who remains on the books at Yorkshire despite not playing a first-class match this year, said: "I apologise unreservedly to Azeem for the words I used when we played together.
"I did use unacceptable - at times, racist - language. If I had realised how much this hurt Azeem, I would have stopped immediately. That's why I wanted to meet him this week and be clear in person that I intended no malice. That's not an excuse, I realise that the language I used was wrong."
Ballance, who played 23 Tests for England between 2014 and 2017, is currently suspended from international duty as part of the England and Wales Cricket Board's investigation into Rafiq's claims.
He missed the start of the season and only last month returned to action for Yorkshire's second XI.
He added: "I have wanted to meet Azeem in person for quite some time, but I had to make sure I was in a good place when I did so. Azeem has been through similar mental health challenges and understands why this has taken me a little time.
"I have accepted, from the outset, the words I used were wrong and I hope this statement brings Azeem some comfort.
"There is no place in our sport for this behaviour and I am determined to play my part in ridding the game from racism and make it more inclusive. To do this we all need to be honest and learn from our past mistakes."
Rafiq first made allegations of racism and harassment against Yorkshire two years ago and the club and several unnamed individuals have since been charged by the ECB.
The ECB said the Cricket Discipline Commission panel hearing to look at the cases was expected to take place in September or October, with the decisions and full written reasons set to be published after the hearing.
But Rafiq's claims have led not only to sweeping reforms at Yorkshire - overseen by new chair Lord Kamlesh Patel - but in the game in this country as a whole, with the ECB last year publishing a 12-point action plan to tackle racism.
"From day one of opening up about my experiences, all I ever wanted was acceptance and apologies for what happened," said Rafiq, who hopes Ballance can now resume his cricketing career.
"Gary has been brave to admit the truth and I understand why the mental strain has made it difficult for him to make this apology any sooner. Gary must be applauded for his honesty and unreserved apology and must now be allowed to get on with his life.
"Gary got things wrong, so did many people. The main issue is cricket's institutional racism. Gary's courage means he is now part of the solution. I hope he can be allowed to get on with his cricket.
"I would like to thank Gary. He has done cricket and the fight against racism a great service with these words. I would also like to thank those who have been in contact with me privately to apologise for what they witnessed.
"It's a good time for those who were bystanders to reflect on whether they could have done the same or even spoken publicly about what they saw."