Originally joining on a month-to-month contract in November, the Algerian has impressed during his short time in Somerset.
Making seven appearances in green and white so far, Town have secured the services of the versatile defender for the rest of the season.
Joining the Glovers from Endorsed Academy and its partner club Mousehole AFC in Cornwall, the Algeria Under-20 international will now continue to be an integral part of the squad going into the second half of the campaign.
Fresh from signing a new deal, Gafaiti told YTFC.net: “I’m pleased to have sorted my future and look forward to helping the team for the rest of the season.
“It’s a great club for me to continue my development at and the only option in my head was to stay.”
Agreeing the contract extension with the defender, manager Darren Way added: “Adel has come in and strengthened the squad, with his services now secured for the rest of the season.
“It’s now important that he keeps developing and learning to take him to the next level.”