Bad struts do not affect your gas mileage.
Bad struts have no way to affect your gas mileage but when you have bad struts your ride comfort when riding in the car or driving the car can be bad.
Bad struts on a car can also cause the vehicle to wear out tires faster as well as possibly cause your vehicle to go out of control.
If you do have bad struts it would be a good idea if possible to get them replaced or replace them.
New struts should cost around $100.00 to $200.00 each depending on the vehicle and if you hire a shop to do the job it may cost you $500.00 to $1,000.00 for parts and labor for all the struts to be replaced.
If your gas mileage has gone down then it's something else such as clogged fuel injectors, bad spark plugs, bad spark plug wires, bad ignition coils, clogged air filter, clogged fuel filter etc.
But bad struts will not cause you to use more fuel.