The Welshman tapped home from close range after a Cristiano Ronaldo free-kick was poorly dealt with by Lokomotiv Moscow goalkeeper Guilherme.
Although the Russian side levelled the score, a late Douglas Costa goal was enough to send Juventus through to the knockout stage of the competition with two matches to spare.
However it was Ramsey’s goal that made history, as the Welshman became the first British player to score for Juventus in the Champions League or European Cup.
It also marked the 28-year-old’s first goal in Europe’s top competition since 2015.
Ramsey will look to continue his goalscoring form in Serie A this weekend when Juventus welcome AC Milan to the Allianz Stadium on Sunday night.