In this article, a 28 GHz endfire antenna based on ball grid array (BGA) packaging is proposed for the 5G mmWave new radio (NR). The antenna is composed of a pair of dipole patches fed by a substrate integrated waveguide (SIW). Besides, quasi-coaxial vertical transition and transition from grounded coplanar waveguide (GCPW) to SIW are designed on the substrate to achieve compact size. The substrate is based on a single-layer printed circuit board (PCB), which can meet the cost-effectiveness requirements of the 5G application. Meanwhile, the proposed antenna can be easily integrated with other surface-mount devices by using the BGA packaging. In particular, it can be mounted near the RF front-end chipset to improve system performance. Finally, the prototype is manufactured and verified. Experimental results show that the -10 dB bandwidth of the proposed antenna is 5.35% in the range of 27.3 to 28.8 GHz, and the peak gain achieves 4.4 dBi at 29 GHz.