Generalized frequency division multiplexing (GFDM), an enabler of beyond-5G wireless networks, can be critically impaired due to radio frequency (RF) phase noise. However, joint channel estimation and phase noise compensation for GFDM systems have not been addressed before. Hence, we tackle this problem. To this end, we propose an iterative algorithm for joint channel and phase noise estimation and two algorithms for joint data detection and phase noise compensation. These algorithms use linear and non-linear least-squares (NLS) methods and employ block-type and comb-type pilots. The complexity of these algorithms is also analyzed. Moreover, to reduce their complexity, interpolation techniques are deployed to decrease the number of unknowns. We also analyze the signal-to-interference-plus noise ratio (SINR) and sum-rate of GFDM contaminated with phase noise. Furthermore, the accuracy of the channel and phase noise estimates is established via Cramér-Rao lower bounds (CRLBs). The simulation results illustrate that the mean square error (MSE) performance of the proposed joint channel and phase noise estimator reaches the CRLB. Moreover, the proposed joint data symbol detection and phase noise compensation algorithms nearly eliminate the impacts of phase noise in GFDM systems.