Vertical bar in Pokémon Go Gym display
This line is a grouping line to show sets of 5. It is to make it easier to count the number of pokemon in a gym, because counting lots of little dots can be difficult on tiny screens in the glaring sun. If you see a bar, you know there are five pokemon to the left of it, so you only have to count the number of bars and the dots to the right.
Number of pokemon in gym = (number of bars * 5) + dots/crown to the right of the last bar.
That line indicates that the gym is above level 5.
It exists so that, at a glance, you can quickly tell the level of a gym just from the dots. Each dot represents a level and the crown represents one more. A filled dot is a Pokémon on the gym and the crown is the gym leader's Pokémon.