You need to have discrete values to be able to compare dates and find gaps. Since datetime is not quite discrete in a sense of days (you have hours, minutes and seconds), you might think of creating a calendar table, something like:
|date |
|----------|
|01-01-2000|
|01-02-2000|
|01-03-2000|
...
12-31-2050
I doubt that you will need to fill it till year 9999.
The calendar table can contain either dates, months, or years, depending on your requirement.
After you have such table, you can left join the calendar table with your data table to find gaps, depending on your criteria. Something like:
SELECT date, table.id
FROM calendar
LEFT JOIN table on calendar.date BETWEEN table.start_date AND table.end_date
WHERE table.id IS NULL
This is a basic hypothetical example, since you haven't provided the full information about your tables and query, but you can work on it to obtain the result you want.