Hi G.,
I've gone through constipation with two kids now - it's no fun. I would deffinetely discuss with your doc but I would be prepared to judge how bad the pain is so you can properly inform your doc. If your baby is consistantly in pain (not just struggling here and there) then personally I would work with my doc to try to relieve this pain. Some doctors may be slow to respond to the issue (because most kids have some level of constipation and work through it as they age).
Both my kids had favorable diets (juice, water, prunes, green veggies, etc) and daily BM's but still had major constipation problems. With my first child my doc at the time did not take it very seriously (kept telling me to modify her diet visit after visit). However, she had such bad constipation issues that she ruptured her sphincter muscle (so beyond behavioral issues that can develop you can cause physical issues). After 8 visits to the doc and the ruptured muscle, my oldest ended up on Miralax (at the advice of the doc). The problem started when she was ~8 months old and she just got off of the Miralax at 3 1/2.
The youngest started on lactulose at 8 months. It sounds like the docs now prefer lactulose to Miralax for babies because it passes through the system and they seem to believe it is safer.
The only gerber food I would deffinetely stay away from are the dehydrated fruits. They can deffinetely cause big issues. The docs will also tell you to use pear juice (apple juice tends to constipate). I would also stay away or minimize eating bananas (although both my kids love them - but they can cause major concerns).
Good luck and if your kid is in pain keep asking for help until it is resolved. Also, depending upon the magnitude of your problem you may need to see a GI doctor.