Yes, you will be denied entry abroad if your passport is about to expire. Additionally, if you need a visa, you won't receive one with a valid passport of less than six (sometimes three) months. For this reason, you have to make sure that your passport is up-to-date before you travel.