Please don't shoot the messenger!
I play the heavy weapons a lot on eGO servers. Kalt is my flavor of the month so I will use that map as my example. These tips apply to all DODS maps and how to down that pesky MG and in many cases sniper as well. I have seen many great tips mentioned already in this thread and I may example some of them again from my perspective. For my tips to be more useful let us assume that the Allies and the Axis are fairly even, therefore the strong MG or sniper can have a chance to play up to their best potential.
1. Know where the MG's and Sniper's hang out the most. There are primary and secondary positions that we like to set up at if possible. These are the choke points in a map and when I control that section it allows my team faster and safer movement to the next forward position.
2. Give the position of the MG or sniper to your teammates if you know it. Maybe they can take out these people for you. Teamwork wins games. Save someone else from dying and they might clear the MG out for you. I move around to my secondary positions to avoid death, otherwise I block a choke point as long as I can before dying, so tell your team where they can find me.
3. Try not to run around blind corners, because I love setting up on the other side of these pathways. As mentioned by many people throw grenades around corners. Grenades can either slow me down or take me out. If you know I am close to an exploding grenade, but not yet dead, quickly follow up on it because the concussion messes up my vision so much I can not see a running enemy. Smoke also forces me to move, because I die too many times if I stay in a position where I can not see enemy movement.
4. Find the flank areas to the MG and Sniper positions. In Kalt go through the sewers and get behind my location. If you are out of my range, you are safe from me. That is why assault or support must keep an eye on the sewers for the less mobile weapons. Remember MG's set up in the sewer as well, but they are easier to take out with well placed nades thrown around a corner.
5. Creep around corners very slowly. It is hard for the MG to see you, but beware the sniper standing next to me.
6. Some people who shall remain nameless allow their comrades to run around a corner drawing my attention to that poor soul or souls first. As I follow the bait from left to right or right to left as the case may be, the lily livered, chicken blankety blank, no good wimp pops around the corner for a well placed shot at me while I try and take out the other "expendables". Just remember what goes around comes around and bad Karma will catch up to you! (Sorry, I just thought I would throw that in.)
I play the MG like a sniper rifle. My favorite MG for this is the 30 CAL, because it is so accurate. I do not have a scope, but I can paint the corners quickly. Remember to spectate the better MG and sniper players. You can learn from all of them.