I've been able to get my stuck sunroof closed a few times. Basically while I'm holding the button I just grab the molding of the window and pull forward on it and keep doing so until it starts to move on it's own, but very slowly. One time while pulling I had to also hold down the wind deflector.
Once it's close raise the window by holding down the button until it stops. It will make the "grinding" noise again but that seems to put things back to normal. If you don't hold down the button it won't raise all the way and the next time you go to slide it open you'll noice it does it very slowly because it's still not seated right.