(With) a grain of salt is a literal translation of an ancient Latin phrase, (cum) grano salis.
The phrase comes from Pliny the Elder's Historia Naturalis , regarding the discovery of recipe for an antidote to a poison. In the antidote, one of the ingredients was a grain of salt. Threats involving the poison were thus to be taken "with a grain of salt" and therefore less seriously.
To take 'it' with a grain of salt means 'to accept a thing less than fully.' The Oxford English Dictionary dates this usage back to 1647. The terms are not dissimilar – both essentially mean to regard certain things with some understanding and common sense.