The 18-year-old German, who made his senior debut for the Gunners last season, has featured five times during the current campaign.
"Arsenal is a great football club and I'm so happy to be here and sign a new contract," Gnabry told the team's official website. "For me, now it's all about working hard and developing my game.
"I've had some good opportunities recently in the first team, which has given me extra confidence, and this will only improve my game. I'm looking forward to giving my best for this club in the years to come."
Gnabry's previous contract was due to end in summer 2015.