All wireless gateways tend to under-perform in their router functionality. None of them have great range compared to a stand-alone router.
If you have the TG862G...oh brother...that one is a dog! Well known to have issues with connecting to various devices. Even Comcast acknowledges this. They have tried loading a newer firmware, but from what I have read, it too is not yet ready for prime time.
One solution? Call Comcast and have them place the gateway in bridge mode (they have to do that) and re-connect the previous router.