0250 GMT February 29, 2020
The Barcelona star curled home an inch-perfect free-kick after just 12 minutes of Saturday's game, but was lucky to escape with a yellow card for chopping down Andres Roa and provoking a brawl between the two teams just before halftime, AFP reported.
The host controlled its emotions better after the break and Luan sealed the win with a dipping effort from outside the box seven minutes from time.
"This is what we have dreamed of. It is not an easy road, but we want the medal," said Luan.
Brazil will face Honduras in Wednesday's semifinal in Rio after the Central Americans stunned South Korea 1-0 thanks to Alberth Elis's winner in Belo Horizonte.
Germany, which beat Portugal 4-0, faces Nigeria in the other semifinal after the Africans beat Denmark 2-0.
World Cup memories
Victory keeps Brazil's quest for a maiden football gold medal on track and the enticing possibility of a final against world champion Germany at the Maracana next Saturday, just two years after the Germans inflicted a humiliating 7-1 thrashing on Brazil at the World Cup semifinals.
Neymar missed that match having been stretchered off in tears with two broken vertebrae when Brazil dumped a James Rodriguez-inspired Colombia out of a bruising quarterfinal two years ago. The match saw 54 fouls.
Colombia got its revenge by ending Neymar's tournament prematurely once more at last year's Copa America, this time through suspension. The Brazilian lost his head at the end of a 1-0 defeat and aimed a head-butt at Jeison Murillo that earned a four-game ban.
Eased by the relief of avoiding another embarrassing exit on home soil with a 4-0 win over Denmark on Wednesday to win Group A after back-to-back 0-0 draws with Iraq and South Africa, Brazil started brightly.
"In the first two games we were a bit anxious, but after (against Denmark) we got the goals and the team felt more at ease on the pitch," added Luan.
Neymar, the poster boy for the Games, finally got off the mark at the fourth attempt when he curled home a free-kick from 25 yards.
The match then descended into a blood bath when Neymar sparked a brawl by crudely chopping down Roa.
The 24-year-old received just a yellow card, but four Colombians also found themselves booked before halftime as they sought retribution.
"These knockout games are like this," said Brazil midfielder Renato Augusto.
"They are about gritted teeth, keeping your temper, sometimes the football gets left behind, but you have to always be concentrated.
"We count on Neymar to invent something when things get difficult."
Despite its struggles early on in the tournament, Brazil is still yet to concede and sealed a place in its third consecutive Olympic semifinal when Luan's effort from outside the area left Bonilla helpless.
"It was a tough game. It was physical, tense...to play against Colombia is never easy because they are a great team," said Paris Saint-Germain defender Marquinhos.
"This victory gives us a lot of strength for what is to come because Colombia were one of the stronger sides that could have got to the final."