In Batman & Robin #6, Jason and Dick have a bit of a yelling match at each other near the end of the issue. Soon, Jason is being dragged away by the police, as Gordon just arrested him. However, RIGHT IN FRONT of Jim Gordon and several police officers, Jason refers to Dick as "Grayson" and Dick calls Jason by his name, after all, he is unmasked.
Jim Gordon is aware the Wayne family, he knows Bruce adopted Dick Grayson and Jason Todd ... it shouldn't be hard to make that connection.
In the past, Jim has had opportunities to know Batman's secret identity, I cannot remember the exact issue off hand, but I know Batman offered to tell him on at least one occasion. But Jim has always expressed disinterest, preferring not to know. But here it's staring him in the face. Once more, other police officers are present.
Someone is going to put this together, surely?! Though back to my original point, do you think Jim Gordon now knows Dick Grayson is the current Batman, making Bruce Wayne the former Batman? In several of the panels, while Dick and Jason argue, Jim is just standing there, observing them, or has his back to Dick, maybe not knowing what to say to him, now that he knows.
(By the way, I put this in the Jason Todd forum, rather the Jim Gordon because Jason was the one who started using their public names (ie, Grayson) while they were still in costume, in front of non-Bat-family members).