UPDATE: Found it!
I believe the work you are referring to is the animated short What on Earth! (1966). You can watch it here.
It sounds like you're describing a scene out of the beginning of the movie "The Hitchhiker's Guide to the Galaxy" (2005):
FORD: Remember when we met? That car was racing toward me, I was trying to greet it, you pushed me out of the way?
QUICK CUT TO A STREET - MID-DAY: Ford stands in the middle of the road, extending a hand
to a fast approaching car. Arthur drops his shopping, dives at him and tackles him out of the way as the car zooms past.
FORD: Didn't you find it a little strange that I was trying to shake hands with a car?
ARTHUR: I assumed you were drunk.
FORD: (shaking his head) I thought cars were the dominant life
form. I was trying to introduce myself.
(PDF of the script can be found here)
This is a specific instance of a general trope: "Mistook The Dominant Lifeform". As mentioned in the examples at the above link, the more specific cars-as-dominant-lifeform trope has cropped up in Transformer comics and Carl Sagan's book Pale Blue Dot: A Vision of the Human Future in Space (1994), but there are probably a number of other works it has appeared in as well.