The Northern Ireland wide-man replaced Scott McDonald on the hour mark as the Hoops struggled to add to Glenn Loovens' first-half opener in the SPL clash at Parkhead.
With nerves jangling in the dying stages, McGinn fired in from the edge of the box to seal the victory and take Celtic to within one point of Rangers, who play their game in hand against Hibernian at Easter Road on Sunday.
The 22-year-old former Derry City player has spent most of his time on the bench since joining Celtic in January but is hoping his goal will help make the starting XI for the visit of the Ibrox men.
"There was a bit of nervousness and so it was important to get our second goal," said McGinn.
"Hopefully that will make the manager think about his team over the next couple of weeks.
"I feel I am getting fitter, becoming a better player and my confidence is on a high.
"So far my season has been unbelievable and hopefully soon I will be in the starting XI, week-in, week-out."
Having missed out at Ibrox earlier this season, McGinn hopes to be involved on January 3.
"My only low point was not being involved in the Rangers game at Ibrox.
"If I get a start against Rangers on January 3 I will be more than ready.
"It's another challenge I relish and even if I'm on the bench I can come on and make an impact."
McGinn hopes the SPL title momentum will turn towards the Bhoys in the next week.
"But it was important to get the three points today to close the gap on Rangers, so hopefully Hibs can do us a favour by pulling off a win or by getting a draw, which will also be a good result.
"We also need to win on Wednesday night against Kilmarnock to make sure we go in the Rangers game on a high."
Celtic manager Tony Mowbray praised McGinn, saying: "Niall is progressing as a player.
"I hope that he understands that his career is hopefully on an upward trend and it's bit by bit for him but there will come the day when his talent demands that he plays."
Celtic squandered a series of chances throughout the game and they almost paid the price near the end.
Accies substitute Flavio Paixao drove the ball past goalkeeper Artur Boruc only to see referee Stevie O'Reilly point for a Celtic foul because the ball had seconds earlier struck the arm of twin brother Marco Paixao, after he took a fresh-air swipe at the ball.
Mowbray claimed that for once, the Parkhead side got the "rub of the green".
He said: "The referee gave the foul right away but I think it was a bit harsh.
"We haven't had much rub of the green this season so we will happily take that one."
Marco Paixao appeared to be confused as to what constitutes a foul as he repeatedly pointed to his arm while explaining the circumstances in which he was penalised.
"It was a normal movement of my body, it touched me on my arm, not my hand," he said.
"My brother then scored and I thought it was a goal.
"I tried to explain to the referee that it was a normal movement.
"My brother couldn't believe that the referee didn't give the goal, he was speechless."
Accies boss Billy Reid was not aggrieved about O'Reilly's crucial decision.
"No complaints," he said.
"Over the 90 minutes Celtic deserved to win the game.
"I was disappointed how we started the game, I thought we gave Celtic too much respect.
"But we kept in the game and I knew we would get a chance.
"I thought Marco should have scored at first but it bounced up, hit his elbow accidentally and the referee called it, so no problem at all."