"Safety-net" non-flagship state school grad now at a "top 3" (or however USNews has been juggling) med school. Echo a lot of what people said in this thread.
Now that I have some experience with behind-the-curtain workings of a high-tier med school, I would say the things I (personally) would recommend are:
1. Solid MCAT – this is as closest to a Great Equalizer you can get. To be frank, getting a 4.0 at my alma mater was not the same as getting a 4.0 at UCLA. Classes were not a walk in the park, but the curve was less severe. A high MCAT may help validate a high GPA from a school adcoms have little experience with. Back in ye olden days I scored what was ~523 and I think that may have helped assuage doubts about my academic pedigree.
2. Some distinguishing endeavour – doesn't have to require a gap year or years, but engage in something you are passionate about. Show significant dedication, show significant growth, and (for tippy-top schools) show significant success. I was lucky to live in a big city that had a ton of sweet stuff cooking in both research and community service outlets. Successful research at a prestigious neighbouring institution: 1) probably gave my app more "street cred" and 2) let me delve into larger projects with more "wow factor" than were available at my undergrad. Students at higher-tier schools, in addition to typically being very smart folks, are further supported by having higher-tier opportunities available. We had people at my UG garner great acceptances with just internal service/research work, but sometimes looking beyond the small school bubble – and demonstrating standout performance in a respected organization, international arena, or governmental agency – will prove that you can run with the big dogs.
--- and once you have that ---
3. Apply broadly. The process is still a wild ride for even the most solid of apps. You never know what places may bite. I'm ultimately attending a school I threw on at last minute because my pre-health advisor was like: "you'll never know."
4. If you have impostor syndrome, wrangle with it now. I was leery about applying to top med schools because I never thought they'd give me a second glance. When I got to med school, I was slower to jump at opportunities because I thought my peers were more intelligent and I was coming in as a "big fish in a small pool." This was a counterproductive mentality and I have been kicking myself for not diving in feet first. I still struggle with impostor syndrome – and even my Ivy League peers have confessed to it as well – but I wish I had sought help with it sooner.
5. Remember/respect your roots. I learned a lot from my UG. The education I got there was solid and our pre-health advisor was a diamond-in-the-rough. The avg admission stats there were GPA ~3.1, SAT ~35th percentile, so the folks I worked with typically had much different backgrounds and challenges than most of my current med school peers. (And there were plenty I bet could have succeeded at top med schools, but had way tougher life circumstances than I!). Sure it would have been great if my UG had more resources and pizzaz or whatnot, but at the end of the day it was a US college education. It's somewhat off-putting when I ask "Why Soybean State?" and you're like "Well I could have gone to Harvard but..." You're a smart cookie. That's why you're at the interview. You don't need to gauge your worth with previous college acceptances; tell me about what assets/circumstances made it the best option and the awesome stuff you did post-matriculation at Soybean State. [Close to fam? Cool! Cheapest tuition? Sweet! Liked the vibe? Awesome! Unique opportunities? Tell me more! Only place you were accepted to? Not a problem – you're a college grad all the same! Maybe this round you'll get to choose!]
I will say making the jump from a low-tier UG to a top-tier med school was one of the single best things I could have done for my career goals. When talking to peers from lower-funded med schools, the opportunities here are staggering and the "activation energy" needed to join impactful ventures or meet field leaders is lower. The simple privilege of proximity is real. Obviously med school is not a cakewalk regardless of institution, but the wealth of opportunities and support available makes me feel stupidly lucky to have been able to come here. It can be a kind of a daunting path to be a podunk alum applying in a sea of glittery grads, but anecdotally my med school has given me equal treatment and I would encourage anyone considering this route to go ahead and take the plunge.