Wilson has scored 40 goals in 79 league games for the Magpies since arriving from Bournemouth in 2020.
"I'm delighted to extend my time here," Wilson said in a club statement.
"I've been welcomed ever since I came through the door and now the club's going in a fantastic direction and on a journey so it's nice to commit my future to be to being a part of that.
"We've got some great things to look forward to and I think being around here, the city, fan base, is what players dream of so I can't wait to be around for the next few years.
"When I first joined the club, I had ambitions to come back to the Premier League having been relegated with Bournemouth and over the first few interviews I mentioned Europe and I mentioned getting to 100 Premier League goals.
"They were ambitions of mine and they still are. I'm close to get into the '100 Club' and also becoming the second all-time Premier League scorer for Newcastle would be an amazing achievement, having looked up to Shearer for many years.
Magpies boss Eddie Howe, who previously worked with Wilson at Bournemouth, said the club are "very pleased" that the forward has signed a new deal.
"He's an outstanding person, an outstanding footballer and I'm delighted he's going to be with us for longer.
"He's an incredibly motivated person and I've never seen Callum not motivated to score goals. I think that's a great thing for a striker.
"He's always there in training and in games, wanting to score goals, and I'm sure that'll be driving him on to achieve more and more with Newcastle United at a very exciting time for the club."