In this paper, an improved design of a practical 2700-bent, 60 kV, 60 kW, indirectly heated cathode-based electron gun has been proposed in order to reduce high voltage breakdown in the electron gun. This ensures reliable and uninterrupted operation of the electron gun for melting and evaporation applications. For this purpose, 1) shield electrodes have been optimally designed for gun insulators in order to provide desired voltage grading/shielding and 2) optimization of positioning of the gun electrodes and optimal current in Helmholtz coil in order to ensure desired 2700-bent electron beam at the target plane, have been achieved. A new optimization technique incorporating formulation of a 3-D cost function is developed and is implemented by using an open-source web application utilizing python script. Electrostatic and electromagnetic 3-D gun simulations are carried out by using CST Studio Particle Tracking Module with modified parameters. Trial experiments have been conducted to monitor breakdown signal which showed improvement in surface flashover performance of electron gun. Molybdenum tablets were successfully melted at target plane by achieving the desired 2700-bent electron beam. Dimensions of molybdenum melt pool and simulation results showed good correspondence.