This paper introduces a novel algorithm for designing a low-pass filter (LPF) and a microstrip Wilkinson power divider (WPD) using a neural network surrogate model. The proposed algorithm is applicable to various microwave devices, enhancing their performance and frequency response. Desirable output parameters can be achieved for the designed LPF and WPD by using the proposed algorithm. The proposed artificial neural network (ANN) surrogate model is employed to calculate the dimensions of the LPF and WPD, resulting in their efficient design. The LPF and WPD designs incorporate open stubs, stepped impedances, triangular-shaped resonators, and meandered lines to achieve optimal performance. The compact LPF occupies a size of only 0.15 λg × 0.081 λg, and exhibits a sharp response within the transmission band, with a sharpness parameter of approximately 185 dB/GHz. The designed WPD, operating at 1.5 GHz, exhibits outstanding harmonics suppression from 2 GHz to 20 GHz, with attenuation levels exceeding 20 dB. The WPD successfully suppresses 12 unwanted harmonics (2nd to 13th). The obtained results demonstrate that the proposed design algorithm effectively accomplishes the LPF and WPD designs, exhibiting desirable parameters such as operating frequency and high-frequency harmonics suppression. The WPD demonstrates a low insertion loss of 0.1 dB (S21 = 0.1 dB), input and output return losses exceeding 30 dB (S11 = −35 dB, S22 = −30 dB), and an output ports isolation of more than 32 dB (S23 = −32 dB), making it suitable for integration into modern communication systems.