Real Madrid secured a valuable 2-1 victory over visiting Celta Vigo after coming from behind in the Spanish League.