On morphological grounds they fall closest to the sphecoid wasps, although the lack of an adequate fossil record has made it impossible to pinpoint the exact ancestral phyletic line. In a word, the Apoidea can be loosely characterized as sphecoid wasps that have specialized on collecting pollen instead of insect prey as larval food.
Source: wiktionary