How can I seal around pipe baseboard heating to seal out smoke from downstairs?
There are a few different issues here, including one that I'll bet you didn't think of:

Smoke/Odors

This is your initial concern. Something like Great Stuff Foam will do well for this.

Heat Resistance

Here is where it gets...tricky. I have found various references - the one specific one I found for Great Stuff or similar foam (and it may vary both between brands and between products within a brand) was 240 F. That is high for a normal room. But is not so high if you are talking about a heating system. Around ordinary forced air ductwork that would be fine or around dryer ductwork (I found plenty of references to that). A big question though is What is your heating system?


  It is gas heat...coils under baseboard


Gas heat is typically either forced air or a boiler heating water that is pumped through radiators. So "coils under baseboard" sounds like hot water. Which unless it is actually high pressure steam (not something typically found in apartments but used in some big buildings and industry), it is likely &lt; 212 F and probably OK. But you might want to measure the temperature of these coils when the heat is on to get an idea of what you are really dealing with.

FIRESTOP

This is the biggie, which I doubt you have considered. If cigarette smoke can get from one apartment to another, a REAL FIRE could spread life-threatening smoke and flames just as easily! (OK, yes cigarette smoke will kill you too - but secondhand smoke takes a long time. An actual FIRE will kill in minutes.)

I don't know the exact rules, but there are some pretty strict rules in most areas about fireblock between apartments (so a fire in one apartment doesn't kill everyone else in the building before the fire department can get there), between residential areas and garages and probably other specific areas as well. This typically means that there are no openings between those areas where smoke and fire can easily get through and that all walls, doors and windows between those areas are "fire rated". That doesn't mean fire can never get through - the rules set minimum times for a fire of a particular temperature to be prevented from getting from one room to another, provided the doors, windows, etc. are closed at the time.

So if your landlord doesn't care about you smelling smoke, and doesn't care about wasting energy on heating &amp; cooling (if there are gaps between floors I'll bet there are gaps to the outside as well), I'll bet the landlord would definitely care about being in violation of code requirements regarding firestops.

That being said, you don't need to confront your landlord or call the building department - neither tends to end well. But you may be able to get your landlord to pay for sealing the cracks, holes, etc. if they understand the importance of proper firestop.