It very much depends on how long this problem has been going on as to how it is dealt with.
A young dog that has perhaps only experienced car travel when it left its mum and littermates, then again to the vet for vaccinations, and if a young dog from a rescue centre, then include that journey as well – it all adds up to a dislike in car travel and who can blame it.
So, if the dog is young and the problem has not been going on for long at all, then you can help by not using the car for journeys at all to begin with. Offer all meals in the car, whilst it is stationary, and remove dog once finished. If the dog enjoys its food, we are now making a more positive association with the car. The dog should not even see the car other than when it is to be fed in it.
Once the dog is happily getting in car and eating food you can move onto very small journeys, consisting of no more than a few minutes to a favourite walk area, were your dog can get out and have some fun. Once you start these journeys, make sure the dog has not just been fed or has a full stomach.
Gradually build up distance, but not every journey should consist of being longer and longer otherwise the problem may arise again.
For older dogs or dogs that have had the problem for longer, it is best to speak with your vet and get a referral to a good positive behaviourist that can counter condition and de-sensitise to the issues.