I had the same problem three years ago when I resumed cycling after a 30+ year hiatus. I was in such bad shape I needed to stop every 400 yards to wheeze and catch my breath. I dreaded any slight incline. The worst were stop signs or traffic lights on inclines. I'd have to get off and walk across the intersection in busy areas, or cheat on lightly traveled intersections and do the rolling Idaho stop (roll through stop signs when safe to do so; stop and go at red lights when safe to do so). A few times when safe to do so, I'd U-turn, backtrack, get up some momentum and try again.
Took a few weeks... okay, months... to get into good enough shape to full stop on inclines and restart. And that was with platform pedals.
When I switched to clipless pedals on my road bike earlier this year I had to relearn starting from a dead stop on inclines. Lots of fumbling to clip in again, included barked shins and shelled nuts.
Then I saw some videos of pros and advanced amateur cyclists doing the U-turn thing to regain momentum going downhill, then another U-turn to take another crack at climbing a steep incline. And that's after tacking back and forth like slow sailboats to climb really steep hills.
Everybody has their point at which they need to backtrack or bail out.