The MSP stated that a "distressed" McGarry came to his office in Glasgow city centre in February 2014. He said that was told by McGarry that she did "not have the money" and was threatened with losing her property that day.
Mr Yousaf said that he then gave McGarry £600 which was later paid back.
McGarry, 40, who represented Glasgow East at Westminster for the SNP, is accused of taking more £25,000 from two organisations advocating for Scottish independence between April 2013 and August 2015.
McGarry allegedly embezzled £21,000 while treasurer for Women for Independence between April 26, 2013 and November 30, 2015. A second charge states she took £4,661 between April 9, 2014 and August 10, 2015 when she was Treasurer, Secretary and Convenor of Glasgow Regional Association (GRA) of the SNP.
Mr Yousaf told jurors in evidence at Glasgow Sheriff Court that McGarry arrived at his West Nile Street constituency office.
Mr Yousaf: "I think she was speaking to my office manager at the time Shona McAlpine.
"She came to my office in a state of distress. I asked her what was wrong and she told me she was threatened with being evicted that day if she didn’t come up with around the sum of £600 and she didn’t have the money at that point.”
He added: "I offered to give her a loan of funds about the £600 mark from the bank across the road. I made the transaction and the money was returned roughly in the timescale."
Allan Macleod, defending, put it to Mr Yousaf that McGarry had not gone directly to the witness and asked for cash.
The lawyer suggested that Mr Yousaf had overheard a telephone call between McGarry and Miss McAlpine then a later conversation between the two in person at his office.
Mr Yousaf agreed and stated that he then had a conversation with McGarry where he discussed loaning the money.
He was also asked by Mr Macleod if it was fair to say that McGarry was "disorganised" and "overdramatic."
Mr Yousaf replied: "Yes."
The trial continues.