The adjective "hard" is an exception to the rule that adverbs can be built from adjectives by adding "ly". So "hard" can be used both as an adjective and as an adverb.
So your sentence should be
People in the gym work out hard.
Hardly has various other meanings, e.g.
- I hardly know her. (I don't know her well at all.)
- You can hardly expect me to answer all the questions on ELL SE. (That would be unreasonable.)
- There's hardly any cheese left. (There is almost no cheese left.)
Here's an example of contrasting meanings:
- I'm tired because I've worked very hard.
- I have hardly worked, so I still have a lot of energy ;-) (= I have worked very little ...)
Also notice the different placement of hard and hardly.
early, far, fast, late can also be both adjectives and adverbs.
See the Internet Grammar of English.