Simmer, don't boil; that's your motto -- or should be -- for heating your panna cotta base of cream and sugar. Always go slow and low when you heat cream for a dairy-based dessert to avoid separation (that means keeping temperatures slightly below the boiling point, so don't walk away while you're heating your base).
Never allow your gelatin to boil, either; boiled gelatin won't thicken, and your panna cotta won't properly set if that happens. Also, be sure you don't bloom your gelatin in hot water -- gelatin is no good at temperatures higher than 130 degrees Fahrenheit (54 degrees Celsius), and don't add dissolved gelatin to a cold mixture; both will leave lumps in what should be a smooth and velvety panna cotta.
And what if your panna cotta just won't set, despite your efforts? One of the tricks to the dish is achieving the right balance of gelatin in your mixture, and sometimes you just need to try again. Heat the mixture over low heat. Separate out a small cupful and add extra (bloomed) gelatin to it; slowly pour it into the heated mixture, stirring constantly, and allow it to set -- again.