The M&P used to be more expensive than the Glocks. Before the gen4s came out, Glocks were standard around $499 retail. M&P's were more like $549 to $599.
The M&P's have come down in price in the last couple of years. My best guess is due to the amount of sales they have experienced. Economies of scale, R&D paid off, etc.
The increase in Glock price is partly because of the additional 3rd mag with the Gen4, extra stuff(backstraps), and partly because of the newer design. You're helping to pay off the development costs.... and partly just inflation, I'm sure.
I really like both Glocks and M&Ps. I regretfully let my M&P 9 Pro Series go a few months back, but I plan on getting another standard M&P 9 and adding the APEX forward set trigger and the other bits to it in the future.
I did just recently pick up a 'used' (3rd party) but unfired, new-in-box M&P 45 mid-size with 3 magazines and an Apex DCAEK still in the plastic for an easy $400 cash. I never get deals like this, so I was pretty surprised. The M&P 45 mid-size is the model that I've always wanted. I have had the full-size and compact in the past. I don't like the looks of the extended slide on the full-size and I didn't like the grip on the compact. The mid-size has the full size grip and compact slide(4" barrel). Got the Apex kit installed and it's awesome as usual. All it needs now is to be loaded up with Trijicon HD's.
Do I like it as much as my Gen4 Glock 21? No, I don't. But I really like the G21. I like it better than the HK45 and even USP 45, too. Size vs capacity, it's just a spectacular weapon. With the simple +2 base-plate, it becomes a 15rd magazine and it's not nearly as huge as the FNX-45. I have no trouble concealing the G21 with the standard 13rd magazine.
Most days, I carry the G17. Sometimes the P229 or P226. If I want to go a little smaller, the P30 or USP compact get to go for a ride.
So... back to your original question. Is the price difference worth it? Yes and no. I find any price difference between the M&P and Glock to be wholly inconsequential. It's barely the cost of a single trip to the range. It's less than I'll spend on new sights for either gun. It's a couple of mags. Basically... whichever gun you like best - buy it. Write off the cost of entry because you'll get years of enjoyment from both of them... and if you're an addict like the rest of us, you'll probably end up owning both anyways.
Clear as mud? Glad I could help.
Good luck on whatever you choose.