This encapsulating resin composition comprises an epoxy resin (A), a hardener (B), an inorganic filler (C), and a compound (D) represented by the following formula (1). In formula (1), R1 is a polar group or a hydrocarbon group. This electronic component device (10) comprises an electronic component (11) and an encapsulation material (12) with which the electronic component (11) has been encapsulated, the encapsulation material (12) being a cured object obtained from the encapsulating resin composition.