South African Pistorius streaked into an early lead and was almost 10 metres ahead as the athletes came into the home straight, before the Brazilian launched an astonishing fightback.
Oliveira ate up the ground and surged past Pistorius in the final few metres.
The underdog finished with a time of 21.45 seconds, seven hundredths of a second ahead of Pistorius, who won gold in the event four years ago in Beijing, with American Blake Leeper in third.
The result left Pistorius seething about his opponent's prosthetic blades, which he claimed were too long.
"This is a really strong race of mine, and as I said in the mixed zone, the size of some of the other guys' legs are unbelievably long," Pistorius told Britain's Channel 4.
"Not taking anything away from Alan, he's a great athlete, but the guys who do the measuring in the courtrooms, some of these guys are a lot taller and you can't compete for stride length.
"We're not racing a fair race. The International Paralympic Committee (IPC) have the regulations, but the regulations allow the athletes to make themselves unbelievably high. We tried to address the issue in the weeks leading up to this, but it fell on deaf ears.
"The guys are running ridiculous times. Alan is a great athlete, but I run just over 10 metres per second, so I don't know how you can come back from eight metres behind after 100m to win. It's ridiculous."
Pistorius apologised for the timing of his outburst on Monday, but not the content.
"I would never want to detract from another athlete's moment of triumph," he said in a statement.
"I do believe that there is an issue here and I welcome the opportunity to discuss it with the International Paralympic Committee but I accept that raising these concerns immediately as I stepped off the track was wrong.
"That was Alan's moment and I would like to put on record the respect I have for him."
Oliveira's winning time was still 0.15 seconds slower than the world record set by Pistorius in Saturday's heat.
The 25-year-old, dubbed the "Blade Runner", was defending the 100m, 200m and 400m Olympic titles he won in Beijing four years ago. Last month, he became the first double amputee to run in the Olympics and made the 400 metres semi-finals.
"He is a really great idol, and to listen to that coming from a really great athlete is really difficult," Oliveira said. "I don't know who he's picking a fight with - it's not with me.
"The length of my blades are all right because I went through all the procedures with the referees.
"Once I came inside the track, it had all been cleared up and I think Pistorius also knows that.
"I have been using them for a whole month; just the same blades, according to the IPC rules...
"I am very happy: I have written my story on the Paralympic wall."