Mr Yousaf thanked people for their solidarity after Mr Galloway tweeted: "You're not a Celt like me."
Mr Galloway drew criticism on after he posted a message on Twitter which appeared to be directed at Mr Yousaf.
He tweeted: "Well #Humza you're not more Scottish than me. You're not a Celt like me. You're not working-class like me.
"You didn't go to a state school like me. You're not more socialist than me. So stop pretending. You're a poseur. @Alliance4Unity"
Mr Galloway opposes Scottish independence and has founded the Alliance 4 Unity party, hoping to win seats at the Holyrood election.
Mr Yousaf hit back at Mr Galloway's comments, with a nod to the former MP's appearance in Celebrity Big Brother in 2006 when he imitated a cat.
The justice secretary tweeted: "You haven't managed to ever get elected to the Scottish Parliament like me.
"And I suspect the voters of Scotland will show you the cat flap again come May 6.
"When you are shown the door, please take your race-baiting 'You're not a Celt like me' mince with you."
He added: "Thank you for all the solidarity folks, Galloway isn't the first race-baiter nor the last that I will encounter.
"The people of Scotland will give him the boot, let's not give the desperate attention seeker any more of the oxygen of publicity he craves. "
Mr Galloway later tweeted: "As the father of five mixed-race children I treat #Humza's accusation that I'm a racist with contempt."