The 29-year-old came on after 66 minutes in place of the Croatian international Ivan Rakitic.
Turan momentarily looked to have received a red card before the referee realised his mistake and switched the red card for the yellow card.
The Turkish international’s goal came in the 86th minute when he headed in a cross from Jeremy Mathieu.
The reigning champions have gone 35 games without a defeat which is a club record and matching the overall Spanish record set by Leo Beenhakker during his time in command of Real Madrid back in the 1988-89 season.
Rayo Vallecano 1 – 5 Barcelona
Stadium: Campo de Futbol de Vallecas
Kick-Off: 20:00 GMT
Barcelona (4-3-3): Bravo; Vidal, Pique, Mascherano, Mathieu; Busquets, Arda, Iniesta; Messi, Munir, Neymar
Manager: Luis Enrique
Rayo (4-2-3-1): Carlos; Tito, Ze Castro, Llorente, Martinez; Baena, Iturra; Bebe, Jozabed, Piti; Guerra
Manager: Paco Jemez