I work backward. "The climax and final battle are going to last 1 hour and the game lasts from 1-5, so I better make sure the characters start the climax at 3:30-3:45." If it's 3:00 and the characters are reaching the end-game, then throw in an extra encounter or two, or encourage role-playing.
Feel free to narrate the final battle or adjust HPs if the game is running long. "With a final blow, you kill X."
I'm of the opinion of not asking if people want to end early or late. If you get some who are OK with it and some that aren't, you need to choose and you'll end up disappointing someone. But, that's just my take.
Finally, if you are forced to end early, you can spend the rest of the time talking about the game. This is especially true with players who aren't familiar with the game -- they may be on the fence on buying it for their gaming group, and you can give them more information to make that decision. Or if they already know about the game, you can talk about house rules and such.