Yes, gravity definitely affects the maximum heigh of mountains.
Think on a solid bar of steel. It sticks straight because of the electronic forces. But when you make it larger and larger gravity makes it bend: gravity starts being considerable, but still smaller than electronic forces.
If you make the bar larger, there will be a moment in which the weight of the whole bar will be larger than the short-range electronic force: your bar will break purely due to gravity.
Exactly the same happens to mountains made of solid rock (as opposed to sedimentary ones quoted by Hobbes). There is a point,k depending on the strenght of planetary gravity, where it takes over short-range electronic forces, making the mountain collapse.
This is exactly the force that "rounds up" the planets, as opposed to the non-spherical asteroids.