Preheat an outdoor grill for medium-high heat and lightly oil the grate.
Spread a piece of aluminum foil on a work surface. Arrange potatoes, onion, bacon, and garlic in the middle of the foil. Drizzle olive oil over potato mixture and season with salt and pepper; toss to coat. Wrap foil around potato mixture to form a packet.
Place packet on the preheated grill and cook until potatoes are tender and bacon is cooked, about 15 minutes. Carefully open packet by slicing foil with a knife.