Glass properties play crucial roles in ensuring the safety and reliability of electronic packaging. However, challenges, such as thermal expansion and resistance to acid corrosion, pose long-term service difficulties. This study investigated the impact of the microstructure on acid resistance by adjusting the glass composition. A glass material with excellent acid resistance was obtained by achieving a similar coefficient of thermal expansion to tantalum; it exhibited a weight loss rate of less than 0.03% when submerged in 38% sulfuric acid at 85 °C for 200 h. Theoretically, this glass can be used to seal wet Ta electrolytic capacitors. Differential scanning calorimetry (DSC) was used to analyze the glass transition temperature and thermal stability of borosilicate glasses. X-ray diffractometry (XRD), scanning electron microscopy (SEM), and Raman spectroscopy were used to study the microstructure of the amorphous phase of the borosilicate glass, which revealed a close relationship between the degree of network phase separation in the borosilicate glass and the degree of polymerization (isomorphic polyhedron value, IP) of the glass matrix. The IP value decreased from 3.82 to 1.98 with an increasing degree of phase separation. Boron transitions from [BO4] to [BO3] within the glass network structure with increasing boron oxide content, which diminishes the availability of free oxygen provided by alkaline oxide, resulting in a lower acid resistance. Notably, the glass exhibited optimal acid resistance at boron trioxide and mixed alkaline oxide contents of 15% and 6%, respectively. Raman experiments revealed how the distributions of various bridging oxygen atoms (Qn) affect the structural phase separation of the glass network. Additionally, Raman spectroscopy revealed the depolymerization of Q4 into Q3, thereby promoting high-temperature phase separation and highlighting the unique advantages of Raman spectroscopy for phase recognition.