The 19-year-old Martinelli – who penned his new contract exactly a year after joining Arsenal – has scored 10 goals in 26 games for the club since moving from Brazilian side Ituano last year.
He has been sidelined for the rest of the season after suffering a knee injury in training which required surgery.
“I am very happy that Gabi has signed a new contract with us,” manager Mikel Arteta told the club website here “He is a very talented young player and he has impressed us with his performances, attitude and work-rate.
“We are looking forward to getting him back to full fitness and to watching his development at our club.”