340 Slowly Shutting Down ???

Sounds more like it is running out of fuel even though you say it has 5PSI. Is there a fuel filter after the gauge? If so replace it. Next would be checking the carb.