You outscale him pretty hard as a Kat, so your job is just to survive lane (and if possible, roam for kills whenever he backs/isn't pushing). Normally, Katarina doesn't build gunblade anymore (too expensive really) but getting an early revolver to sustain through his constant pressure (and also sustain through his DPS whenever you all-in) means that this matchup would probably be one of the times to make an exception and get the extra sustain (that and the higher AP they gave Gunblade makes it a bit more desirable than it used to be). Other than that, don't ever fight him in his turret nest, that is essential to surviving lane. It is ok to have one or even two targeting you if you have shunpo up, but never be in range of more than two, and try to stay away from all of them if possible, because Heimer is best when he can drop his burst on you and then kite through his turrets/Zhonya's inside his nest, leaving you to take a lot more damage for relatively low cost to himself. You need to capitalize on being resourceless and try to get him to go OOM, because when heimer is OOM, half of his defense and burst go with it (rockets and grenade, along with ult). Poke with Q as often as you can, just try to never take return harass (whether by standing behind minions, or shunpo-ing out of the way when he fires his W or E). If/When you need a gank (and even though you may not like it, you probably will) tell your jungler not to go hard for a kill right away. When ganking Heimerdinger, you need to burn his cooldowns first, including flash, heal, Zhonya's, ult, etc. before actually going for a kill, because trying to kill a Heimer who has everything up is suicide until after mid game (unless you are already really fed) without his ult, most of hist burst (empowered W) or revenge kill potential (empowered Q) are gone, and without heal/flash/Zhonya's, most of his survivability is gone. He is still a tricky little bugger to kill, but only having to deal with base abilities and his standard turrets is a much better situation for you than wading through everything else.
Kat has a harder time than most against Heimer, but roaming, sustain, and repeated "drive by ganks" are the key to success against him. It isn't guaranteed to get you ahead every time (because of course you won't play a perfect match every time), but doing these things will definitely make it more bearable. Just remember whenever you roam, try to coordinate with your jungler so that you have a 2 man advantage instead of just a 1 man advantage.