The Scottish actor, who grew up on a working class estate in Edinburgh, stars as Eric Effiong in the series about socially awkward high school student Otis (Asa Butterfield) and his sex therapist mother Jean (Gillian Anderson).
He said that when he moved from Scotland to London aged 21, he was unable to cope with the financial burden and ended up without a home.
Speaking to The Big Issue magazine, he said: "I am from Scotland and moved down to London when I was 21. I was working constantly - and at some good places - I spent a year at the
Globe Theatre, I did a lot of work at Kneehigh, who are a physical theatre company.
"But you have to feed yourself, you have to get to work, with rent, bills, travel, days off from temping to go to an audition. I couldn't seem to handle it all financially.
"I was supposed to move into a new place and it fell through. So for five months before Sex Education, I was couch-surfing among all my friends. I didn't have a home. I was homeless.
"The only thing stopping me from being on the streets was the fact I had friends. But you can use up that goodwill. Or you feel scared to ask people for help. Your pride kicks in.
"So my life before Sex Education was so different. To go to my audition, I had to get my friend to transfer me 10 quid so I could top up my Oyster card."
Speaking to the Independent Gatwa also said “People have tried to fight me,” as they questioned how a black man could possibly be from Scotland.
He said he felt like telling those who denied his Scottishness to: "‘Stop taking my Scottishness away. You don’t define me.’”
Talking about growing up in Edinburgh, he said: “Resilience has always been something I’ve seen and admired.
“I grew up with a single mum, an immigrant mum who couldn’t speak the language, no money, three kids on her back, coming from Rwanda, and she’s done a sterling job with all three of us.
"I saw her struggle, I saw her fight all the time.
"Every day was another fight, and she always fought tooth and nail for all three of us.
"She just seemed to get through whatever hardship came her way.
"I think that’s made me quite a resilient person.
Season two of Sex Education launches on Netflix on January 17.
The Big Issue, sold by vendors to lift themselves out of poverty, is available to buy from January 13 across the UK.