Gellar, 38, played his character's child and business partner on CBS's The Crazy Ones, which ran for one season in 2014. Williams would have been been 64 on Tuesday.
"Smile, though your heart is aching. Smile, even though it's breaking," Gellar captioned a black-and-white portrait of the co-stars hugging and laughing. "Happy Birthday RW."
Williams, who battled addiction and depression throughout his life, committed suicide Aug. 11, 2014.
"My life is a better place because I knew Robin Williams," Gellar told PEOPLE in a statement last August. "To my children he was Uncle Robin, to everyone he worked with, he was the best boss anyone had ever known, and to me he was not just an inspiration but he was the Father I had always dreamed of having. There are not enough adjectives to describe the light he was, to anyone that ever had the pleasure to meet him. I will miss him everyday, but I know the memory of him will live on. And to his family, I thank them for letting us know him and seeing the joy they brought him. Us crazy ones love you."