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

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2022-06-17</periodOfReport>

    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001653482</issuerCik>
        <issuerName>Gitlab Inc.</issuerName>
        <issuerTradingSymbol>GTLB</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001886054</rptOwnerCik>
            <rptOwnerName>Johnson Eric David</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O GITLAB INC.</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>NOT APPLICABLE</rptOwnerCity>
            <rptOwnerState>DE</rptOwnerState>
            <rptOwnerZipCode></rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>Chief Technology Officer</officerTitle>
            <otherText></otherText>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Class A Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2022-06-17</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>31350</value>
                    <footnoteId id="F1"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>56179</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Performance Stock Units</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F3"/>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2022-06-17</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>47025</value>
                    <footnoteId id="F4"/>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <footnoteId id="F5"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F6"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Class A Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>47025.0</value>
                    <footnoteId id="F4"/>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>47025</value>
                    <footnoteId id="F4"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">Represents a grant of time-based restricted stock units (&quot;RSU&quot;), with each RSU representing a contingent right to receive one share of Gitlab Inc. (the &quot;Company&quot;) Class A Common Stock subject to the reporting person's continued service to the Company on each applicable vesting date. The RSUs shall be satisfied over a four-year period, vesting quarterly from the date of grant.</footnote>
        <footnote id="F2">Includes shares of Class A Common Stock that have not yet vested. This also includes vested shares from the Company's Employee Stock Purchase Plan.</footnote>
        <footnote id="F3">Each performance stock unit (&quot;PSU&quot;) represents a contingent right to receive one share of the Company's Class A Common Stock, subject to the achievement of certain performance criteria and the reporting person's continued service to the Company on each applicable vesting date following such achievement.</footnote>
        <footnote id="F4">The number of PSUs in this column represents the number of shares of Class A Common Stock the reporting person will receive assuming achievement at the &quot;target&quot; level of the corporate performance metrics set by the Company's Board of Directors for this award.</footnote>
        <footnote id="F5">Once the performance criteria have been achieved, the award shall vest in four equal quarterly installments thereafter.</footnote>
        <footnote id="F6">If the performance criteria are not achieved, the portion of the award which was capable of vesting on that date will expire.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>/s/ Robin Schulman, Attorney-in-Fact for Eric David Johnson</signatureName>
        <signatureDate>2022-06-22</signatureDate>
    </ownerSignature>
</ownershipDocument>
