Why are you asking about your pH? Did yout ry to change it? If you are/were doing so, stop. It's unecessary and stressful for all the fish. They'll do better if you let them adapt to a stable, if not perfect, pH. As for whether it's the cause of the problem, no.
Your gourami is most likely suffering from an internal bacterial infection. You should isolate him and treat with antibiotics immediately. Let me emphasize the isolation part - don't try to treat in the main tank. That'll only cause problems for your other fish. If you don't have an isolation tank, a heated bucket (cover it so he doesn't jump) will do as long as you change the water daily. Alternatively, a large plastic storage box that is food-safe or one of those 2 gallon plastic critter keepers would serve the purpose.
Ok now, I'm assuming it's a bacterial ifnection simply because dwarf gouramies are extremely prone to them and almost inevitably succumb to such diseases at some point or another. However, I can't be certain without more info. For a start, how long have you had him? What color is his poo (keep an eye out for it)? When did he stop eating? Are there any signs of abnormaly rapid gill movement? Does he go up for air at regular intervals? Are there any red streaks or blemishes on him? Any sign of cotton wool-like growths or ulcers? Are the scales sticking out, resembling a pinecone somewhat?
Lastly, what size tank do you have, what other fish are in it and state your water parameters for ammonia, nitrIte, nitrAte and, since you mentioned it, pH.
Meanwhile, try feeding a de-shelled smashed green pea in case the problem is just constipation and work on getting an isolation tank ready for him. Also, feed peas to all your fish so the gourami does not eat anything else that may make his condition worse (ie dry flake food).