Yes, of course God wants us to take care of the bodies He has given us, and proper exercise is certainly part of that. The Bible says, "You are not your own; you were bought at a price. Therefore honor God with your bodies" (1 Corinthians 6:19-20).
At the same time, I urge you to take seriously what your wife is saying, and ask yourself why you're spending so much time at the gym. Frankly, the reasons may be hard for you to face honestly, but you need to do it anyway, both for your sake and the sake of your marriage and family. Are you seeking to escape from your responsibilities at home? Has the gym become your social life? Or are you too preoccupied with your physical appearance?
Whatever your reasons, face them honestly, and if they need correcting, ask God to help you get your life back in balance. Your family needs you -- and you need them. Don't let anything come between you and your responsibilities at home.
Most of all, has this taken the place of God in your life? God not only gave us a body and a mind, but He also gave us a soul so we can know Him. Make Christ the center of your life, and then make it your goal to live for Him. The Bible says, "For physical training is of some value, but godliness has value for all things, holding promise for both the present life and the life to come" (1 Timothy 4:8).