<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0206</schemaVersion>

    <documentType>3</documentType>

    <periodOfReport>2018-06-01</periodOfReport>

    <noSecuritiesOwned>1</noSecuritiesOwned>

    <issuer>
        <issuerCik>0000912562</issuerCik>
        <issuerName>GIBRALTAR INDUSTRIES, INC.</issuerName>
        <issuerTradingSymbol>ROCK</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001631948</rptOwnerCik>
            <rptOwnerName>Barberio Mark G</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>3556 LAKE SHORE RD</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>BLASDELL</rptOwnerCity>
            <rptOwnerState>NY</rptOwnerState>
            <rptOwnerZipCode>14219</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>true</isDirector>
            <isOfficer>false</isOfficer>
            <isTenPercentOwner>false</isTenPercentOwner>
            <isOther>false</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable></nonDerivativeTable>

    <derivativeTable></derivativeTable>

    <footnotes></footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>/s/ Paul J. Schulz, Attorney in Fact for Mark G. Barberio</signatureName>
        <signatureDate>2018-06-11</signatureDate>
    </ownerSignature>
</ownershipDocument>
