He is a bus driver for Transway Bus Lines who does the trip from San Francisco to Minnesota. Riley boarded the bus he was driving when she was trying to run away, but after Sadness and Joy returned to her, she changed her mind and asked him to stop so she could get off.
During the credits, Gary's bus is seen stuck in the traffic in front of Lombard Street. It is revealed that all five of his emotions have taken the shape of Anger (echoing a comment made earlier by Riley's Anger that people stuck in traffic were his "kind of people"). Gary's "true" Anger attempts to recall a joyful memory to "find their happy place," but he gets instead the TripleDent commercial, causing all five Emotions to yell out of anger, their heads bursting with flames.