A class priority list is not going to be useful because there are simply too many variables that change the priorities depending on the situation.
1. Shoot the closest target first
This is a decent general rule of thumb, regardless of what class the target is. At long distance, bullet spread and damage-falloff make heavies very ineffective. They are the kings of short / medium range. When someone on the enemy team runs straight into your team, it is mainly the heavy's job as a defensive class to kill him, for two reasons. First, the heavy's short range damage output exceeds even that of the demoman. Nobody can vaporize short range targets faster than a heavy if he is already spun up. The second reason is a minigun does not need to reload. If a soldier, demoman, or scout has to shoot the overextended enemy, they are using up loaded ammo to kill things the heavy could have killed faster anyways, ammo which they can use to shoot things farther away than you can shoot. Do not ignore the enemy running by because you think he is a "low-priority class" that someone else can kill while you are trying to shoot that fleeing medic from across the map instead. A corollary of this rule is you need to see someone in order to shoot him, so check in all directions around you and look all directions (including up) frequently. A good heavy should be a dizzy one.
Another part of this point is sticky bombs. Sticky bombs on the ground can be destroyed by bullets. Usually a demoman firing them at you / your team will detonate them immediately, but if he's slow, every one that you do manage to destroy is 60-120 fewer damage dealt to your entire team. However, sticky bombs are tiny and can be hard to hit with heavy bullet spread, so you should really prioritize players. However, in the absence of anything better to shoot, don't be the heavy that's wasting bullets on far away targets while there are undetonated stickies carpeting the floor right at your feet.
2. Shoot the greatest threat to your medic.
If you have a medic nearby, your top priority targets are the biggest threats to your medic (threats to yourself still come first - you are no good to your medic when dead). That scout that runs by, ignoring you, is probably trying to drop your medic. If he's any good at aiming it will only take him 0.625 seconds to fire 2 shots that do 80-105 damage each. Don't ignore scouts. Shoot them instead, and don't lose your medic to random scouts. Scouts often come in from flank paths or weird places so again, look around you often. If you are relying on your medic to ask you to turn around, it may be too late. A similar thing applies to soldiers. The only thing better than you at stopping a jumping soldier is a sentry, but either way you should make sure that soldier is pinned to the skybox with bullets.
3. Don't spend more than 3 seconds shooting at the same target at a time
Your close range damage output is insane. If you can't kill a target and they can't kill you in 3-4 seconds of continuous shooting, that's probably not a battle worth fighting. After 3-4 seconds, it's time to check behind you for any enemies that tried to make a move while they thought you were distracted. 3 seconds is about enough time for a spy to realize you are distracted and get you, so if you haven't looked all around you in the last 3 seconds, look again. Don't get fixated on mini-sentries or other heavies all the way across the map - fewer than half of your bullets are hitting the target at that range so don't waste your time / ammo.
In general a heavy's job is to provide a stronghold. You are too slow to spearhead a push as effectively as a soldier / demo can, but what you can do is spin up just behind the front lines of your team and give them a safe zone to fall back to, where any enemy that tries to invade will be greeted by a face full of your bullets (e.g. the above case of scouts / soldiers going for your medic). Remember that heavy is a defensive class, not a fragging class.