We present the first polynomial time algorithm to learn nontrivial classes of languages of infinite trees. Specifically, our algorithm uses membership and equivalence queries to learn classes of ω-tree languages derived from weak regular ω-word languages in polynomial time. The method is a general polynomial time reduction of learning a class of derived ω-tree languages to learning the underlying class of ω-word languages, for any class of ω-word languages recognized by a deterministic Büchi acceptor. Our reduction, combined with the polynomial time learning algorithm of Maler and Pnueli [MP95] for the class of weak regular ω-word languages yields the main result. We also show that subset queries that return counterexamples can be implemented in polynomial time using subset queries that return no counterexamples for deterministic or non-deterministic finite word acceptors, and deterministic or non-deterministic Büchi ω-word acceptors. A previous claim of an algorithm to learn regular ω-trees due to Jayasrirani, Begam and Thomas [JBT08] is unfortunately incorrect, as shown in [Ang16].