Switch lens to manual, turn the focus ring manually until the image is sharp.
or
Set centre spot as the AF point (there are 3 af points), put this over your subject, half press the shutter, when the green circle stays on keep the pressure on, recompose & shoot.
If its dark or the subject is an even colour with no edges then the camera will struggle to focus.
It could be a fault with the lens, it could be a fault with the body.
A rebel G is now pretty old, if it's been well used then it may just be end of life, the cost of repair certainly would be a lot more than buying a more recent EOS film camera on an auction site, something like an EOS 300, 300v or 300x is ideal, same kind of size & weight, same controls, far superior AF system.
good luck