Mine's had this problem for over a year, but I've not had a long enough break from work to fix it. If the hinge in yours snapped, and your iMac is guaranteed under Apple Care, it's time for a trip to the Genius Bar.
Make sure to make note of this thread at Apple's Support Communities.