Heat oil in a medium heavy pot over medium. Cook onion, stirring occasionally, until very soft, 8–10 minutes. Add garlic and cook, stirring occasionally, until very soft, about 5 minutes; stir in basil. Add tomatoes, crushing with your hands as you go; season with salt and pepper and bring to a simmer. Reduce heat; simmer gently, stirring occasionally, until sauce is thick, about 1 hour. Season with salt and pepper. Let cool.
Do Ahead: Sauce can be made 1 week ahead. Cover and chill, or freeze up to 3 months.