The gym levels up like the rest of the rooms, each level will allow you to go up a certain number of levels.

To check it, just tap on the gym and various buttons related to the gym will appear. One of those buttons is 'INFO', you can press it to see how many levels you can climb in that specific gym level.

The time it will take to raise those levels will also appear when you click on the gym, so you will be able to see the timer, and some option to advance it if you want.