We studied the anisotropy of the superconducting upper critical field Hc2 in the heavy-fermion superconductor UTe2 under hydrostatic pressure by magnetoresistivity measurements. In agreement with previous experiments we confirm that superconductivity disappears near a critical pressure pc ≈ 1.5 GPa, and a magnetically ordered state appears. The unusual Hc2(T) at low temperatures for H k a suggests that the multiple superconducting phases which appear under pressure have quite different Hc2. For a field applied along the hard magnetization b axis Hc2(0) is glued to the metamagnetic transition Hm, which is suppressed near pc. The suppression of Hm with pressure follows the decrease of temperature Tmax, at the maximum in the susceptibility along b. The strong reinforcement of Hc2 at ambient pressure for H k b above 16 T is rapidly suppressed under pressure due to the increase of Tsc and the decrease of Hm. The change in the hierarchy of the anisotropy of Hc2(0) on approaching pc points out that the c axis becomes the hard magnetization axis.