Celso Borges thought he had earned a draw for Costa Rica in the 48th minute after cancelling out Giorgian De Arrascaeta's first-half penalty in San Jose.
However, Rodriguez came off the bench and netted a last-gasp winner for visiting Uruguay, which was playing in the absence of Luis Suarez and Edinson Cavani, at Estadio Nacional de Costa Rica.
There was a new face in the dugout for Costa Rica after Gustavo Matosas' shock resignation because of "boredom".
After less than a year in the job, Argentine-born Uruguayan Matosas revealed on Wednesday: "I didn't know being a national team manager was so boring. I don't regret it and I don't leave frustrated because I gave my best. I won't manage a national team again. I can't only have the players every two months. It's not for me."
It was initially thought Matosas would take charge of this friendly, however, interim boss Douglas Sequeira oversaw proceedings.
Borges' stunning free-kick three minutes into the second half gave Costa Rica something to celebrate after De Arrascaeta had converted a penalty three minutes prior to the interval.
However, Sequeira watched Costa Rica crash to their third consecutive defeat after Rodriguez's powerful low strike at the death.