Preheat oven to 350°. In a 9" x 5" loaf pan, combine garlic, oil, salt, and red pepper (if using), adding more oil if needed to completely cover garlic. Place loaf pan on a sheet tray.
Bake garlic, watching closely toward the end, until largest clove is tender enough to smash with a fork, 45 to 50 minutes.
Let cool to room temperature, then transfer to a sterilized glass jar with a lid, making sure oil covers garlic. Tightly close lid and refrigerate up to 2 weeks.
