Kubica, who suffered the worst crash of his career at the Circuit Gilles Villeneuve last year, led a BMW one-two after Hamilton and Ferrari's world champion Kimi Raikkonen collided in a pit-lane pile-up.
Germany's Nick Heidfeld anchored the Swiss-based team's breakthrough result in second place, with Britain's David Coulthard third for Red Bull.