As someone with gaps in my resume for various reasons, I have found a range of responses by potential employers.
I have worked in two different career fields. When I made that switch, getting the professional certifications took me about 3 months, during which time I was not working. Almost nobody asks about the gap, though almost everyone asks about the career switch.
I have a several year period in which I was working only contract employment. There are gaps of up to 5 months between contracts. Most employers ask something about that time, and most are satisfied with the simple explanation that finding a new contract took that much time.
Some employers care more than others. IBM required me to write a letter of explanation for every gap of 3 months or more. Some employers don't even ask.