It is not true.
"Alas, Einstein’s childhood offers history many savory ironies, but this is not one of them. In 1935, a rabbi in Princeton showed him a clipping of the Ripley’s column with the headline “Greatest living mathematician failed in mathematics.” Einstein laughed. “I never failed in mathematics,” he replied, correctly. “Before I was fifteen I had mastered differential and integral calculus.” In primary school, he was at the top of his class and “far above the school requirements” in math. By age 12, his sister recalled, “he already had a predilection for solving complicated problems in applied arithmetic,” and he decided to see if he could jump ahead by learning geometry and algebra on his own. His parents bought him the textbooks in advance so that he could master them over summer vacation. Not only did he learn the proofs in the books, he also tackled the new theories by trying to prove them on his own. He even came up on his own with a way to prove the Pythagorean theory."