IT WILL BE TIGHT.
If you are staying on property I would sggest the Epcot Resort Area (BWV, BC, etc) as then you have the walk back back-up plan. The next best resort option would be a monorail resort. If you are elsewhere on property I would suggest driving. I am only aware of 2 parking lot exit issues in the last 6 years. In both cases it took an hour or longer to leave the lot. But regardless, you are in control of your drive as you leave and will not be subject to disoriented bus drivers. (they also have the same issues leaving the parking lot).
Your biggest issue with an on property resort is getting a checkout time later than your finish time. Disney is nearly impossible to get a late checkout time. With an 11 am checkout you will cross the finish line the same time you need to be out of the room. Add travel time back to the room and you may not be able to even get into the room. If off property then you can usually negotiate a later time.
Once off property you should not have an issue. It's a good hour drive to the port from the middle of the WDW property. Beach LIne Road can be heavily patrolled so stay within traffic speeds.
Hopefully you are renting
Avis. They have a free shuttle to the ship. Plan on 30 minutes to get through that.
So looking at the times.
5 hour finish - 11 am
1 hour to work through finish chute and get to car - noon
1 hour to get to room - 1 pm
1 hour to clean up - 2 pm
1 hour to drive to the port - 3 pm
30 minutes to get through the rental return 3:30
Ship sails at 4
I think I am long on a couple of the times but a blister here, a slower pace there a cramp or two and you may come over the causeway only to see the ship heading down the channel. It's a tough call but I would look to the cruise returning THursday before the weekend