I always have to laugh a little when someone says this to me. It's not that I get offended by any means, I just don't necessarily understand the logic.
Tell me this... When you are eating a delicious dinner, do you say to the chef "You must have great pots and pans!" No, because while the pots and pans enable the meal to be made (and I'm sure their quality has some effect), we all know they didn't actually do the work. The chef did.
The same is true for photography. The camera is simply a tool... a medium through which artists can create what they see in their mind's eye.
It's really no big deal, just something to keep in mind. The next time you compliment a photo, give the photographer his or her dues.