For 2 < k [abstract: see text] we define lifts of cuspidal Poincaré series in S(k)(Gamma(0)(N)) to weight 2 - k harmonic weak Maass forms. This construction answers a question of Dyson by providing the general framework "explaining" Ramanujan's mock theta functions. As an application, we show that the number of partitions of a positive integer n is the "trace" of singular moduli of a Maass form arising from the lift of a weight 4 cusp form corresponding to a Calabi-Yau threefold.