In this paper, we study the robust estimation of generalized partially linear models (GPLMs) for longitudinal data with dropouts. We aim at achieving robustness against outliers. To this end, a weighted likelihood method is first proposed to obtain the robust estimation of the parameters involved in the dropout model for describing the missing process. Then, a robust inverse probability-weighted generalized estimating equation is developed to achieve robust estimation of the mean model. To approximate the nonparametric function in the GPLM, a regression spline smoothing method is adopted which can linearize the nonparametric function such that statistical inference can be conducted operationally as if a generalized linear model was used. The asymptotic properties of the proposed estimator are established under some regularity conditions, and simulation studies show the robustness of the proposed estimator. In the end, the proposed method is applied to analyze a real data set.