Apple narrowed the gap with Samsung smartphones in the precious US market in the months before the release of the hot-selling iPhone 5 model.