That's "Mimsy Were The Borogoves" by Lewis Padgett (a pseudonym for Henry Kutter and C. L. Moore).
To quote the Wikipedia article linked above:
Millions of years in the distant future, a posthuman scientist experimenting with a technologically advanced time machine sends two boxes with hastily gathered batches of educational toys into the past. The first arrives in the middle of the twentieth century and the second in the latter part of the nineteenth century. Believing the experiment to be a failure when the machines and test objects fail to return, he discontinues his efforts to help save his highly, superhumanly evolved home world.
[...]
In 1942, Emma and Scott encounter Carroll's fantasy book Through the Looking-Glass, containing the poem "Jabberwocky". In its words they identify the missing element of a time-space equation enabling them to travel to the alien destination. (The unusual title of the short story is a phrase from the poem.) Their father arrives in the doorway of Scott's bedroom as the children vanish in a direction he could not understand at all.