Hello and welcome to JustAnswer!
There are a couple things that could be going on.
The gauge could be inaccurate. It may actually be filling the tank but a bad fuel sender is showing you an incorrect level reading.
It could be a venting problem. When you fill the tank it has to displace the air in the tank into the evaporative emissions system. The air and vapors leave through two valves at the fuel tank, it goes through the lines and canister and through a fresh air vent eventually. If one of the valves at the tank is bad or there is a pinched or plugged line in the evap system it will prevent air from escaping and you won't be able to properly fill the tank.