Gideon left Criminal Minds at the end of season 2. He resigned from the BAU after experiencing extreme PTSD following his capture and torture by a serial killer.
The departure was explained in the season 2 finale, "The Fisher King (Part II)," where Gideon confronts his trauma and decides he needs to prioritize his own well-being.
He appears in later seasons, but only in guest appearances, like in the episode "The Fisher King" (season 5) and "The Replicator" (season 8).