Not long after replacing Stephan Lichtsteiner, the Brazilian full-back scored as Juve recorded a 2-0 win at the Estadio do Dragao on Wednesday.
Alves brought down an Alex Sandro cross before doubling Juve's lead, giving them control of the last-16 tie.
Allegri explained his decision to bring on Alves and hailed the former Barcelona defender for his attitude.
"Dani Alves replaced Lichtsteiner, who was booked when we went in front, so I had to play safe in that situation," he said.
"Alves is a champion, a guy with a great will and enthusiasm who won a lot.
"Entering in the last 20 minutes in the way he did, shows that he is an example and a very professional player."
Alves, 33, has made 17 appearances in all competitions this season, having left Barca in June.