Heat oil in a large skillet over medium heat. Add onions, garlic, salt and pepper, and cook 8-10 minutes, stirring occasionally, until the onions are soft and starting to brown. Turn off heat, but leave pan on the burner.
Add the cream cheese and sour cream to onion mixture and stir until cheese is melted and ingredients are combined.
Scrape into a serving bowl, cover and refrigerate at least 30 minutes to 1 hour before serving.