(A) It gives me a chill.
^this is grammatically correct but you'll probably not hear a native speaker say this because it feels unnatural. A more common/natural way to say this would be to pluralize the direct object: "It gives me the chills" which implies that something "freaks you out" or makes you very uncomfortable. It could also be used to convey something very emotionally moving or powerful, like recently I watched a video of a deaf child use new technology to hear his parents speak for the first time, and that gave me chills. I had goosebumps on my arms and tears in my eyes.
A singular "chill" is rarely, if ever used, and would typically be a reference to temperature, like "it's chilly in here".
(B) It gives me a shiver.
Same thing here, you'd need to pluralize this for it to really sound natural:
"It gives me the shivers", or "I felt a shiver down my spine".
I think shiver is less flexible than "chill" because I typically think of it as a negative sensation.