Ineos Grenadiers' Adam Yates attacked on the final climb to claim victory on Stage 3 of Volta a Catalunya and take the overall lead of the race.