The 19-year-old Ramirez shaded a fast, powerful contest against his more experienced opponent, who threw everything forward in the final round but found it was not quite enough as Ramirez edged home 21-20.
Ramirez, who will fight Uzbek Fazliddin Gaibnazarov in the last 16, said: 'I was a little tense in my first Olympic bout but hopefully I can be me in my next fight. I am part of a young team and we are all very hungry.'
Also at Light Weight, Kazakhstan's fifth seed and world bronze medallist Gani Zhailauov was lucky to see off Thailand's Saylom Ardee, coming from behind to pull out victory on countback after a 12-12 draw.
Puerto Rico's Panamerican youth champion Felix Verdejo Sanchez, 19, beat Juan Huertas Garcia of Panama 11-5 with a patient display of counter-punching, while Liu Qiang of China had too much for Australian Luke Jackson, coasting to a 20-7 success.
At Welter Weight, Errol Spence was another USA winner as he took advantage of a clumsy performance from Brazil's Myke Carvalho, who was penalised in the second round for persistent holding, to go through 16-10.
Alexis Vastine enjoyed a successful return to the ring with a 16-12 win over Germany's Patrick Wojcicki.
There were also wins for Mongolia's powerful Tuvshinbat Byamba, Canadian Custio Clayton and Australia's world number five Cameron Hammond, who had too much for Niger's Abdoulaye Hima, winning 13-6.
Great Britain duo Josh Taylor and Fred Evans also progressed to the next round.