is taking a gap year to get into TOP university worth it?

Graduate admission does not depend on your undergrad institution’s overall ranking, but can be affected by the field of study you majored in as an undergrad and the field you intend to enter as a grad student. Depending on your career goals, and the field you want to pursue as a grad student, the top institutions for that could well be anywhere in the world, and quite possibly are not at an Ivy.

What do you want to study as an undergrad?

What do you think you would like to study in grad school?

Does the career you are thinking about right now require grad school at all, and if so, how soon after your undergrad degree?