The Inter midfielder – who was introduced off the bench with just 13 minutes to play - headed home from close range in the 89th minute to delight a small but vocal crowd in Spain.
In a match where both sides enjoyed spells of dominance, Colombia shaded proceedings, with the efforts of Luis Muriel and Jackson Martinez particularly notable.
Colombia – who are ranked third in the world – will now take confidence into their crucial 2014 FIFA World Cup qualifier against Ecuador next month.
Jose Pekerman's side, who sit second in South American qualification, have not reached the World Cup Finals since 1998.
Pekerman did not include Monaco striker Radamel Falcao, but still picked a strong side, while Serbia coach Sinisa Mihajlovic left out big names Aleksandar Kolarov and Dusan Tadic in favour of a younger team.
Serbia burst out of the blocks and captain Branislav Ivanovic had two attempts on goal inside the first five minutes, following up a poor free-kick with a good header that nearly crept in following a Miralem Sulejmani cross.
Serbia controlled the tempo in the early stages and were doing all the attacking, but Colombia awoke from their slumber in the 16th minute.
Muriel was the spark, poking just over from close range before he fizzed a volley wide after an excellent lofted ball from James Rodriguez.
Colombia then turned on the style, with an outstanding move, which featured a series of one-touch flicks, finishing with Juan Guillermo Cuadrado.
Cuadrado powered his way into the penalty area but saw his shot saved as Colombia started to show why they are so high in the FIFA rankings.
There were still flashes for Serbia though, and Ivan Radovanovic was denied a stunning goal by the quick reactions of Colombia goalkeeper David Ospina, who did well to keep out a well-hit effort from 20 yards.
Cuadrado went close again while Martinez was called in to make a goal-line clearance at the other end, following a poor piece of goalkeeping from Ospina.
Both sides were goalless at the break but Serbia could have easily broken the deadlock early in the second half.
Half-time substitute Tadic showed exceptional skill to see off two challenges inside the penalty area before laying off for Filip Djuricic, but his left-foot effort was well saved by Ospina.
Colombia regularly found their attacks thwarted by the positional sense and aerial power of Ivanovic – who was taken off after an hour – while Dusan Bata hit a tame effort at Serbia goalkeeper Damir Kahriman at the other end.
Kahriman dropped a routine cross and almost let Cuadrado in, only to save well, while a follow-up cross fizzed agonisingly wide of substitute Carlos Bacca, who had an empty net to aim at.
Several intricate passing moves saw Colombia threaten, but it seemed like it would not be their night, only for the industrious Martinez to create some late drama.
Martinez initially had his effort saved after he was sent through on goal, but Serbia failed to clear their lines.
A miscued clearance fell to Martinez and his smart header across the face of goal allowed Guarin to nod home from two yards despite the close attention of two Serbian defenders, as Colombia claimed a late triumph.
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1