That was yet another random guard. It has been stated (many times) before that Barney and Gordon knew each other long before the “player” can remember, and I personally believe that this one-shot joke was only meant to be a reference to give the player an idea of who this “new” Barney is based on. Also, his name in the credits of Half-Life 2 and the Episodes is listed as “Barney Calhoun----Michael Shapiro.”
In response to Daniel’s theory, I believe that when Barney was teleported out of Black Mesa, one of a few things could have happened:
A: Barney saw Gordon through the window, and Gordon’s crowbar slipped through the bars. It was caught in his teleportation field and teleported out with him.
B: There was another crowbar in that same closet
C: Barney’s crowbar was kept from Blue Shift, and learning of Gordon’s use of the crowbar, his “back at Black Mesa” line is just a sentiment.
I think Option A is most likely, seeing as Gordon is stripped of his weapons, and it is unknown if the crowbar he acquires after regaining consciousness is indeed the one he used prior, as no other remnants of his arsenal appear in the compactor. However, I suppose that could be explained away as the need for progressive gameplay, or the issues needed to model near-useless “broken” weapons, or an out-of-reach place your arsenal lies in, and et cetera. I know, I know, none of this really matters, but I just thought I’d stop lurking long enough to give my opinion.