Original: Nevertheless he prepared himself, driven by a great desire to learn, to take the entrance exam for grammar school (Gymnasium), which he passed with flying colors.
Simplified: At that place, he was shown to be smarter than other people that were as old as him.