Ecuador secured its first victory under manager Marcelo Gallardo with a 2-0 win over Costa Rica at the Estadio Olímpico de Atahualpa in Quito.