The young Magpies got off to a thrilling start in their Premier League International Cup clash, with Spaniard Victor Fernández opening the scoring at Whitley Park before Allan doubled United's lead from 12 yards after Rosaire Longelo was tripped inside the area.
Despite Jessic Ngankam setting up a frantic finish after halving the deficit late on, Allan netted from the spot once again as Adam Wilson was fouled in the penalty area, allowing the forward to slot home his ninth goal of the season in all competitions as Newcastle's hopes of qualification to the quarter-finals remained on track.
Allan told nufc.co.uk: "I think the performances in the past couple of games have been there but the results probably haven't been going our way. Tonight, I thought the performance and result was just what the squad needed.
"It's always important to get a good start. Victor got the first goal for us and then we, not sort of relaxed, but we had little bit of comfort and we were able to kick on from there.
"I think for this group of lads, we need to defend better and try to keep a few more clean sheets but it's nice to grind the win out and get the late goal for a bit more comfort.
"Before the game, we knew it was a must win game but so is every game. We must take every game as it comes and go into it with the same mindset.
"We managed to do really well in the cup competitions last season so everyone in the group knows what it feels like to go far in them. We'll try our best to go as far as we can in the cups and then try to get into the play-off spots of the league."
Allan has now netted five goals in his previous four games - three of which from the penalty spot - and the 20-year-old was pleased to add to his goalscoring tally.
The Newcastle-born forward netted five times during the 2018/19 campaign and, after featuring as a striker for a number of under-23 matches, is revelling in his current role for United's second-string.
Allan added: "Going into this season, I had a chat with a few of the coaches and it was a big goal to try and score more goals. That's going well at the minute and I just need to keep doing what I'm doing to help the team.
"For me, playing up front is not something that I'm not used to. I played there for a number of years and then when I worked with Ben (Dawson), he moved me out wide. I'm enjoying playing every game. That's all I've got to keep doing and try my best and see what happens from there."