Massive machine-type communications (mMTC) are expected to support a large amount of randomly deployed users for short package transmissions. Noncoherent random access provides an efficient and practical multi-access protocol for mMTC, and also poses new challenges for the receiver design. In this paper, we leverage two well-known methods, i.e., message passing and deep learning, to jointly detect the user activity and the desired data for the noncoherent mMTC. First, by exploiting the exact distribution information of the received signal, a generalized approximate message passing (GAMP)-based algorithm is proposed, which is shown to jointly detect the user activity and the desired data by two modules: inter-user interference elimination and data detection for each user. Inspired by the two-module GAMP-based algorithm, we then propose a model-driven deep learning method, which utilizes the deep neural networks (DNNs) to approximate both the two modules. The loss function for training the DNNs is derived by formulating the two-module detection as an unconstrained optimization problem. Simulation results reveal that the proposed GAMP-based algorithm outperforms the proposed deep learning method when the channel distribution is perfectly known, while it suffers from a significant performance degradation for the case with imperfect channel distribution information.