The electronic structure and optical response of electrically gated bilayer graphene are studied by first-principles approaches. We have obtained the induced band gap that is in good agreement with experiment when the applied electric field is less than 1.5 V/nm. The infrared optical absorbance is calculated within the single-particle excitation picture and its fine structures are presented. In addition, the calculated infrared optical absorbance is found to be strongly depending on stacking styles of bilayer graphene and the polarization direction of the incident light, which provides efficient ways to identify the electric-field intensity and stacking styles in experiment. Finally, many-electron effects are discussed.