I think having a failed startup on your resume is better than having a 2 year gap, especially if the failed startup did some interesting things and you demonstrated your ability in some domain.
https://www.quora.com/Should-I-mention-my-failed-startup-business-on-my-resume-If-yes-how-If-no-why