The Brazil international has scored seven goals in the league this season as the Gunners sit top of the table.
It is understood Martinelli's new deal will run until 2027 with the club holding an option to extend the agreement by an additional 12 months.
"We're delighted Gabi has signed a new long-term contract," Gunners boss Mikel Arteta told the club's official website.
"Our supporters see his quality and energy every single time he puts on the shirt and he's the same every day in training, with his hard work and positive values.
"Gabi is still very young, so we know there's still much more to come from him and it's great that we'll be on this journey together.
"We're now excited to continue to develop his huge talent and look forward to seeing him perform with Arsenal in the years to come."
Arsenal signed Martinelli from the lower tiers of Brazilian football in 2019, joining from Ituano for £6million.
He has gone on to make 111 appearances across all competitions, scoring 25 goals and winning the FA Cup in 2020.