City came from behind to take a precious first-leg advantage while Sergio Ramos was sent off for Real Madrid