Combine tomatoes, onion, garlic, salt, and pepper flakes in a 3- to 4-qt. slow cooker.
Stir in oil. Cover; cook on high-heat setting for 3-4 hours or low-heat setting for 5-6 hours.
Using a hand-held immersion blender, puree marinara in the slow cooker, or puree the sauce in batches in a regular blender. Stir in basil into pureed sauce.
Cook marinara to room temperature, then transfer to a container with a tight-fitting lid. Refrigerate sauce up to 1 week or freeze for up to 2 months. Serve marinara over pasta or use as a sauce for pizza.