Heimerdinger uses those turrets to have a lot of lane presence and those rockets seem to have infinite range. I play a lot of Annie, Veigar, and Gragas in mid, but heimer always seems to kick my ass. I've tried killing the turrets, instead of poking heimer, but that usually just leads to my losing creeps and heimer poking me down. Help please?
You have a few options,
play a safe AP mid and sit back and farm along with buying GP10 items to push you into late game with greater income.
Play an AP with decent burst/cc and have your jungle camp mid. If the Heimer is using turrets he will most likely push and be in position to be ganked fairly often.
Just always remember to have at least 3 minions closer to Heimer than you so that his missiles prioritize them over you.
As you said, Heimer pokes you down. The trick is to 100-0 him, or at least get him that low that he will die next time he runs up to you. So what I usually do, and what I believe works best agaisnt heimer, is to pick a brust champ (annie, Brand, LB), play deffensive and farm (avoid gettin hit by ANYTHING) till I reach a lvl where i can simply run at him, if he stays he dies, if he runs away, he looses cs. If I am sure i can kill him (jungler gank?) I tend to flash stun (as Annie for example).
Generally speaking, you can buy a lot of healpotions as well, and running the tripple gp10 strat (Heart of Gold, Philo Stone and Kages instead of Dorans/RoA) and passivly farming works against Heimer as well. A good thing to do is watch out for YOUR minions as well. If there 3 or more minions and you have them stayin between yourself and heimer, you are pretty much immune to his poke. Heimer is strongest when siegeing you under your own turret, so try to keep the lane pushed. If you cant push out (in most cases, since Heimer can push really good), get your jungler to gank him, and deny his blue buff! Heimer without blue is way less scary. You have to realize as well, that Heimerdinger will always be able to farm. Thats just how Heimer works. But a farmed Heimerdinger is not really that scary, just tell your Support (or jungler) to get an early shurelias and engage on them. If you let Heimer poke you, its way harder to win a fight.
Another strat (I personally dont like it tho) is to pick champs with a high range (Karthus, Anivia) and just either poke him back or destroy his turrets all game. This definitly works if the Heimerdinger isn't that good, but a good Heimer will just keep moving (make you miss your skillshots) while poking you with his rockets.
EDIT: I eprsonally play a lot of Gragas and I like him against Heimer, simply cause you poke just as good as him, you farm pretty good and you can engage on him or set up ganks when your jungler is nearby.
You have two great options when laning against Heimerdinger Mid.
Pick a champion who can safely AOE farm from a distance and clear his turrets (Ziggs, Syndra)
Pick a champion who can jump on top of him and kill him, then get out relatively safely so the Mega Turret doesnt mess up your day (Fizz, Zed, Akali)
He will poke you down, sure, but if you can get a sizeable lead pre-6, its ez mode.
Never pick a champion that is bad under tower without waveclear (Nidalee). Heimer inherantly shoves you to tower, thats what he does.
Heimer also has little roam potential, and is awful at following ganks, so pick someone who can get fed off of other lanes if needed. You will likely lose your tower, but that will happen eventually anyways in a heimer lane.
There's a few things you could keep in mind.
Try to always stand behind at least 3 creeps, or his rockets will pretty much demolish you.
Take a safe AP with good sustain and just farm all day, kill his turrets, kill your wraiths and try to take his. You'll most likely come up on top. If he maxes his turrets first, chances are your jungler will have an easy time ganking him too.
You're very unlikely to outpoke him in lane, which is why he has to be bursted down. As he has second to no escape mechanism except for his stun, which most Heimers skill last.(And probably misses a lot too.)
If everything fails, buy MR early on.
Never stop farming.
For me personally, the most important thing to focus on against Heimer is getting my cs, and destroying his little turrets.
they will shoot you if you just run up and basic attack them, so you typically want to use whatever ranged ability you have to kill them (Ahri's q, Annie's q, Gragas' barrels).
The reason I focus on keeping his turrets down, is that he is most powerful when he has you pushed up against your turret with 3 of his turrets sitting just outside of it.
Destroying those towers makes him much less scary AND more easy to ganked.
As an AP mid, I typically take an Athene's unholy grail as my first item against him. The MR,CDR, and mana regen it offers are extremely helpful, and allow you to frequently toss out your ranged damage ability to destroy his turrets and harass him.
Play a long range poke. Ziggs, Syndra and Cassiopia do very well against him. You can easily drop his turrets and harass him. ziggs especially. I would just get some early mana regen and harass him out of lane with bombs or whatever harass you have and then kill his turrets and push creep wave back. Also once you kill turrets call your jungler over and you should get a fairly easy kill.