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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2020-11-24</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001052752</issuerCik>
        <issuerName>GETTY REALTY CORP /MD/</issuerName>
        <issuerTradingSymbol>GTY</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001280272</rptOwnerCik>
            <rptOwnerName>MONTAG RICHARD E</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>GETTY REALTY CORP.</rptOwnerStreet1>
            <rptOwnerStreet2>292 MADISON AVE 9TH FLOOR</rptOwnerStreet2>
            <rptOwnerCity>NEW YORK</rptOwnerCity>
            <rptOwnerState>NY</rptOwnerState>
            <rptOwnerZipCode>10017</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle></officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2020-11-24</value>
            </transactionDate>
            <deemedExecutionDate>
                <value>2020-11-24</value>
            </deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>M</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>3500</value>
                    <footnoteId id="F3"/>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>51062</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Restricted Stock Unit</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F1"/>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2020-11-24</value>
            </transactionDate>
            <deemedExecutionDate>
                <value>2020-11-24</value>
            </deemedExecutionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>M</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>3500</value>
                    <footnoteId id="F3"/>
                </transactionShares>
                <transactionPricePerShare>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F2"/>
                <footnoteId id="F3"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F2"/>
                <footnoteId id="F3"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>3500</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>52000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Each Restricted Stock Unit (RSU) is settled, at the discretion of the Compensation Committee, in one (1) share of common stock or in cash in an amount equal to the fair market value of one (1) share of common stock, on the settlement date noted in footnote (2) below.</footnote>
        <footnote id="F2">RSUs vest ratably over five years commencing on the first anniversary of the date of grant and, to the extent unvested, fully vest (i) if the director is not nominated for re-election or is not re-elected by the stockholders, or (ii) upon death. RSUs are settled in cash or common stock, in the discretion of the Compensation Committee, upon the earlier of the tenth anniversary of the grant date (or the tenth anniversary of the first vesting date, for RSUs granted in 2016-2018), or termination of service as a director.</footnote>
        <footnote id="F3">The transaction represents settlement of fully vested RSUs in shares of common stock pursuant to the terms of a 2009 Restricted Stock Unit Agreement.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Richard E. Montag</signatureName>
        <signatureDate>2020-12-17</signatureDate>
    </ownerSignature>
</ownershipDocument>
