Barnes beat India's Devandro Singh Laishram 23-18 in the quarter-final contest at the ExCel Arena in London.
The Beijing bronze medalist led 7-5 after the first round and extended his advantage to 17-10 after Laishram picked up a two-point penalty.
Barnes was also deducted two points in the final round but progressed to a semi-final against China's Zou Shiming.
I knew he would come out all guns blazing but I felt stronger than him.
Shiming defeated Barnes at the semi-final stage in Beijing and the pair will clash again on Friday.
Laishram was penalised for use of the head while Barnes received a warning for holding on the inside.
The victory takes Northern Ireland's medal tally for the Games up to a new record of five.
Barnes sparred with Laishram when the Indian team trained in Dublin ahead of the Olympics.
"I knew he would come out all guns blazing but I felt stronger than him.
"He caught me with a few silly shots although I knew I had the fight in the bag and I coaxed it to the end.
"I've trained hard and I know how good I am. I'm confident in myself.
"Let's not forget bronze is for losers - I'm going for gold," Barnes joked, referring to his comments after losing 15-0 to Shiming in Beijing.
Barnes becomes Ireland's fourth guaranteed boxing medallist at these Games after team-mates John Joe Nevin, Katie Taylor and fellow Belfast fighter Michael Conlan.
An impressive victory earned Belfast light-flyweight Paddy Barnes a medal for the second straight Olympics.