The Real Madrid centre-back scored Spain's opener in the 29th minute from the penalty spot before running to one of the TV cameras behind the goal to perform a glasses gesture by cupping his eyes with his fingers.
German referee Deniz Aytekin showed a yellow card to Ramos as he believed he was trying to provoke the crowd.
Spain manager Robert Moreno has said he is ready to step aside should Luis Enrique decide to return to coaching.
Luis Enrique officially resigned from his role as Spain manager on June 19 and assistant Moreno was appointed.
Moreno has overseen first team duties since March 26 after Luis Enrique went on a leave of absence to care for his nine-year-old daughter, Xana, who died last week after a five-month battle with cancer.
When asked if...