When the tank empties a vacuum is created in the tank. If this vacuum becomes too great, the fuel pump cannot pump fuel from the tank.
There should be some sort of relief valve in the fuel filler cap to allow air to be drawn into the tank as the fuel is drawn out, and equalise the tank pressure.
When your engine falters at 1/4 tankful, try and stop somewhere immediately, and take off the fuel filler cap. If you hear air rushing in then the vent in the fuel filler cap is blocked.
To doubly confirm this, leave the fuel cap off (should be ok as regards fuel sloshing out of the filler neck as your tank is nearly empty anyway) and see if the engine power returns to normal.
If it does, either unblock the vent or get a new cap. If none of this works, are you sure your fuel gauge is giving the correct reading? Maybe the sender unit in the tank is faulty?
Alex