I put my Vaporeon on a gym last week and when I checked it after a couple of days, its CP had increased by 211. I didn't level up as a trainer while it was defending, but would have been unable to power it up myself anyway, as you can't do anything with your Pokemon while they're sitting on a gym.
I have only found a few posts from players about this happening. I know some Pokemon have had their CP boosted to balance things out etc., but I thought it meant the CP cap had been raised, not that they could be boosted just by sitting in your inventory or whilst defending a gym.
I have now further powered up my Vaporeon to 1904 and, according to the CP arc, there is still room to power up a little more when I get enough stardust. I took over a gym this morning and have placed my Vaporeon on it. I'm hoping more team members will place some strong Pokemon there too, so I can see if it happens again before getting kicked off.
Maybe it was a one-time boost to help with the balancing out issue? We'll see.